I have a DataFrame as follows:
item_id | item_count | day | month
1 | 2 | 1 | 1
2 | 1 | 1 | 2
...
The dataframe tells what is the item_id
and how many it is sold item_count
per day
, and in which month
. I want to get the item_count
of every item_id
per month
. I think I have to groupby both item_id
and month
, but which of the first seems to give the wrong result. How do I do that?