I have these data coming from a csv file
I did an interpolate with a 5 min period
ecoData = ecoData.resample('5min').interpolate() ecoData.head()
Here is the result
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
Advertisement
Answer
Did you save the result?
ecoData["1/31/2019"] = ecoData["1/31/2019"].map('{:.2f}'.format) ecoData.head()