0

I cannot find any easy way to change a specific value of a multiindex dataframe.

I have a dataframe with a two levels index (ID, Date). I have noticed that some dates for a specific ID are wrong and would like to change it.

My initial guess was to do something like :

df.rename(index={('ID_xx','wrongDate'):('ID_xx','correctDate')}, inplace=True)

But it does not work due to the process behind rename (level and labels lists)

Any thought on how would to correct this wrong index value ?

Thanks !

Esculape
  • 51
  • 5

0 Answers0