79662091

Date: 2025-06-11 13:44:00
Score: 1
Natty:
Report link
df_agg = df[['Col1','Col2']].groupby(['Col1','Col2']).sum().reset_index()

type(df_agg)

Returns

pandas.core.frame.DataFrame

And df_agg has 2 columns : Col1 and Col2.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Nando