So I have a dataframe:
However, there are many duplicated values in the dataframe, after I found out which one are duplicated:
Data[Data.duplicated(keep=False)]
I got a list of which entries are duplicated:
My question is as follows: how can I get averaged values of the duplicated entries and compress them into a single entry for each duplicated entry in the original dataframe?
Example: The Maryland entry would have a single Data_Value that is an average of all the Maryland entries etc.
Thank you