I'm scraping tweets and saving them with pandas. One string isn't saving right. This is my code:
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
tweet_df = pd.DataFrame()
#TWEET STRING + RETWEET
tweet_df['Date'] = [item['created_at'][0:19]]
if item['is_retweet'] == True:
tweet_df['Retweet'] = ["True"]
else:
tweet_df['Retweet'] = ["False"]
tweet_df['Tweet'] = item['full_text']
The string which isn't saving correctly is: "The Starship team is go for prop load; team is keeping an eye on the weather
I am saving the dataframe and looking at it on a csv:
column D column E
Tweet |
________________________________________________________________________
The Starship team is go for prop load | team is keeping an eye on the weather
The csv column has no title and doesn't exist in the dataframe. There are several strings where this is happening, but 90%+ of them are saving fine.
I have tried a regular pandas save.