TATR: Panda Dataframe Manipulation
Introduction
This recipe is part of the Text Analysis for Twitter Research (TATR) series. This recipe will describe Panda dataframe manipulation, in particular the techniques used for some of the more advanced Twitter analysis found in the TATR library.
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
- Import Twitter data
- Create 8 entries, and assign the following 3 values to each:
- Date
- Hashtag_count
- Mention_count
- Replace the index column with the Tweet date
- Combine all of the values of the same date together
- Add the counts of each entry to the dataframe
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:58