I have these data coming from a csv file
I did an interpolate with a 5 min period
JavaScript
x
3
1
ecoData = ecoData.resample('5min').interpolate()
2
ecoData.head()
3
Here is the result
Then I would like to keep only 2 digits so I did a test on the first column :
JavaScript
1
3
1
ecoData["1/31/2019"].map('{:.2f}'.format)
2
ecoData.head()
3
But nothing has changed as a result
Advertisement
Answer
Did you save the result?
JavaScript
1
3
1
ecoData["1/31/2019"] = ecoData["1/31/2019"].map('{:.2f}'.format)
2
ecoData.head()
3