pandas: how can i remove duplicate rows from dataframe and calculate their frequency?,"df1.groupby(['key', 'year']).size().reset_index()"