This is my group by command:
pdf_chart_data1 = pdf_chart_data.groupby(\'sell\').value.agg([\'sum\']).rename( columns={\'sum\':\'valuesum\',\'sell\' : \'sellt
df = df.groupby('col1')['col1'].count() df1= df.to_frame().rename(columns={'col1':'new_name'}).reset_index()