TATR: Panda and CSV of Tweets
Introduction
This recipe is part of the Text Analysis for Twitter Research (TATR) series. The recipe will show how to load and save a CSV (comma-separated values) file into a Panda data structure.
Ingredients
- Python 3
- Panda
- Numpy
- Twitter data
- Kynan Ly’s sample code on TAPoR
Steps
- Open a new Jupyter Notebook and import the following libraries:
- PANDAS
- NUMPY
- Create a Panda dataframe
- Import your Twitter data into the following 4 columns:
- Index
- Date
- Retweet_Count
- Text
- Write a function that reads the dataframe and converts it into a CSV
- Write a function that reads the saved dataframe and loads the CSV back in
- Display the results
Discussion
The TATR library was presented as an academic poster in 2018’s Congress held in Regina, SK. For a PDF version of the full poster, please visit:
Status
Submitted by Jason on Tue, 05/01/2018 - 16:56