I've a Dataset structured like this:
id date body sentiment
1 1/1/2018 Some Text Positive
2 1/1/2018 Some Text Negative
3 1/1/2018 Some Text None
4 1/2/2018 Some Text Positive
5 1/2/2018 Some Text None
For each day, I've some information like body (general text) and an associated sentiment. I would like to know, for each day, the count of positive, negative and None (without values) rows.
I've tried something like this but doesn't work:
df.groupby('date', 'sentiment').count()
df['positive'] = df.groupby('date', 'sentiment').apply(lambda x: x is Positive).count()
Any ideas?