pyladies / info

Ask questions to PyLadies!
18 stars 2 forks source link

Count number of valus in groupby #34

Open mahdisgarshasbi opened 3 years ago

mahdisgarshasbi commented 3 years ago

I grouped my data like this and now I want to know the count of ['col_3] per each ['col_2]. what should I do? import pandas as pd df= pd.read_csv('Data.csv') df_new = df.groupby(['col_1', 'col_2', 'col_3'])