I wish to apply a groupby to multiple columns while running an aggregate function.
Data
country type en start
Japan aa 25 8/1/2022
Japan cc 1 9/1/2022
US bb 5 8/1/2022
US bb 5 8/1/2022
Desired
country type en start
Japan aa 25 8/1/2022
Japan cc 1 9/1/2022
US bb 10 8/1/2022
Doing
df.groupby(['country','type','date'])['en'].sum()
However, this is creating some blank rows. Any suggestion is appreciated.
styler.sparse.indexoption to True would fix your problem.