Here is my dataframe:
date username tweet predict
2020-12-01 xxx xxx negative
2020-12-01 xxx xxx positive
...
I've done .groupby and .value_counts and got result like below:
>>> analysis_textblob.groupby('date').predict.value_counts()
date predict
2020-12-01 negative 2
neutral 1
positive 1
2020-12-02 neutral 1
2020-12-03 positive 2
neutral 1
...
But what I wanted is 'one date each row', like this:
date negative neutral positive
2020-12-01 2 1 1
2020-12-02 0 1 0
2020-12-03 0 1 2
How?