0

I noticed that Python rounded floating numbers after merging 2 dataframes and I was wondering if somebody knows how to disable this function. The original dataframe had value 0.0533903000132149 and after merging this value became 0.0533903. Last 11 digits were cut off, and this causes significant rounding errors in calculations.

Does somebody know how to merge 2 dataframes without changing the original values?

doppelherz7
  • 41
  • 1
  • 1
  • 4

1 Answers1

0

You could try casting your numerical columns into object datatypes (strings), before merging. In that way you will maintain all the values.

PS: Remember that float datatypes are not meant to be precise.

GabrielP
  • 777
  • 4
  • 8