Open mahdisgarshasbi opened 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'])
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'])