Pandas Groupby apply Function on each Group Item
Here we are trying to write a solution for Group by COULUMN_2 Sum the COULUMN_1 values in each group and divide each COULUMN_1 values by Sum of it’s group total. After that we need to do df[‘COULUMN_1’] = df_new[‘COULUMN_2’] Where for example column 1 is RANK and column 2 is Id Thanks