I have three columns.
Client_Number|Date|Transactions
1| 2018-01-13| 11.22|
1| 2018-07-23| 900|
2| 2018-01-12| 990|
7| 2018-07-13| 458|
2| 2018-01-21| 525|
5| 2018-02-24| 773|
5| 2018-02-14| 276|
7| 2018-07-17| 619.75|
3| 2018-08-25| 465.1|
3| 2018-08-28| 8000|
I need to group the clients number column by month and then sum the total transaction made by the client per month.
I have made this :
data.groupby(['Client_Number','Calendar'])['Transactions'].sum()
Client_Number Calendar
1| 2018-07-23| 900.00|
2| 2018-01-12| 990.00|
2018-01-13| 11.22|
2018-01-21| 525.00|
3| 2018-08-25| 465.10|
2018-08-28| 8000.00|
5| 2018-02-14| 276.00|
2018-02-24| 773.00|
7| 2018-07-13| 458.00|
2018-07-17| 619.75|
But what I need is to group the same months in one by client number and then sum all the transactions of those months. I have tried different group by, but I still haven't made it work.