how can I hydrate a dataframe of tweets id's in python

626 Views Asked by At

I have a dataframe in pyspark called tweets and I have in it the column "tweet_id" and i want to get the full tweets using their id and put them in a new dataframe (can i do that using tweepy,twarc or twython?).

1

There are 1 best solutions below

0
Álvaro H.G On

I recommend you to use Tweepy for handeling tweets with Python. Here are the docs.

If you want to hydrate a tweet id with its metadata there is a method for that purpose: api.get_status(). As the docs describes:

Returns a single status specified by the ID parameter.

You'll find the information about the method and all the parameters available here.