I have a dataframe like this
df1 = pd.DataFrame([['a',1,100],['b',2,300],['c',3,400]],columns = ['col1','col2','col3'])
Required output
summary_df = df1.groupby('col1').agg({'col2':'sum','col3':'sum'}).reset_index() #line1
summary_df['col3'] = round(summary_df['col3']/1000,2)
Can we do the division and rounding function in the line1 itself. I have more columns to do like that. So adding a line for each column is not a good idea.