I have strange problem with python pandas and numpy.
>>> np.float64(1) * np.float64(85000) * np.float64(7.543709) 641215.26500000001 >>> r
Yes, but you can't use round( float(num), 2 ) when you work with dataframes:
round( float(num), 2 )
for examle: df.first * df.second * df.third How to round in that case? You can't make float(dt.first)?
df.first * df.second * df.third
float(dt.first)
This is one solution: df.first.apply(lambda x: round(float(x), 2)) But I think is not fast...
df.first.apply(lambda x: round(float(x), 2))