0

I'm using the Twitte API (with Tweepy) to extract a number of tweets via Python.

I'm looping

tweets = tweepy.Cursor(api.search,
               q=((search_term) ),
               since = str(t2)).items(10)

After I get the tweets, I run through a loop that puts the data within a dataframe:

enter image description here

However, when I run the code again, data has seemed to dissapear:

enter image description here

Is there something I could be doing differently? My purpose is to continue adding columns to the dataframe from the same tweet data, but since the data appears to dissapear after the first loop, I can't get it done.

Thanks in advance.

1 Answers1

1

The items property of class tweepy.Cursor is not a list, but an iterator, see documentation.

Michael Hodel
  • 2,845
  • 1
  • 5
  • 10