0

So I have a dataframe:

enter image description here

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:

enter image description here

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

Community
  • 1
  • 1
FateCoreUloom
  • 373
  • 1
  • 2
  • 8

0 Answers0