TATR: Panda Dataframe Manipulation
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.
- Python 3
- Twitter data
- Kynan Ly’s sample code on TAPoR
- Open a new Jupyter Notebook and import the following libraries:
- Import Twitter data
- Create 8 entries, and assign the following 3 values to each:
- 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
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:
Certain aspects of this recipe draw upon code from the companion TATR notebooks and recipes. In particular, please see:
This recipe describes components that are fundamental for some of the more advanced TATR notebooks.