Home > Enterprise >  Pandas / I can't format the data after Resample.Interpolate
Pandas / I can't format the data after Resample.Interpolate

Time:07-02

I have these data coming from a csv file

enter image description here

I did an interpolate with a 5 min period

ecoData = ecoData.resample('5min').interpolate()
ecoData.head()

Here is the result

enter image description here

Then I would like to keep only 2 digits so I did a test on the first column :

ecoData["1/31/2019"].map('{:.2f}'.format)
ecoData.head()

But nothing has changed as a result

CodePudding user response:

Did you save the result?

ecoData["1/31/2019"] = ecoData["1/31/2019"].map('{:.2f}'.format)
ecoData.head()
  • Related