Skip to content

Instantly share code, notes, and snippets.

@JohnDeJesus22
Created June 3, 2020 01:54
Show Gist options
  • Save JohnDeJesus22/62a15e6cc9dd285b411553b716b29237 to your computer and use it in GitHub Desktop.
Save JohnDeJesus22/62a15e6cc9dd285b411553b716b29237 to your computer and use it in GitHub Desktop.
convert text to pandas dataframe
# initiate dataframe for text data
text_data = pd.DataFrame()
# Create columns for text data
text_data['title'] = [article.title for article in articles]
text_data['authors'] = [article.authors for article in articles]
text_data['text'] = article_text
text_data['links'] = search_results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment