I have 2 Pandas dataframes, with thousands of values. I load them from a csv file with Pandas' read_csv function. I need to subtract a column ("open") of the second one from a column of the first, and i do it like this:
subtraction = shiftedDataset.open - dataset.open
And i get a series with the results. The problem is the results come with the weird rounding that comes from the floating point arithmetic. (e.g. a value that should be 0.00003 is -2.999999999997449e-05)
How can i get the correct results? I can manipulate the dataframe before the subtraction or the values after the subtraction, i don't care, but i need to get the best performance possible.