I have a dataframe whose 1 column is of Object type and it has values like 9.04 , 9.05 which I am trying to convert string type instead of decimal as I require it in string format for further transformations. But doing so is changing the decimal numbers to long numbers.
DF['Item Updated'] = pd.DataFrame(PrelimDataDetails['Item'].astype(str))
Item | Item Updated |
---|---|
9.02 | 9.02 |
9.03 | 9.03 |
9.04 | 9.04 |
9.05 | 9.049999999999999 |
9.06 | 9.059999999999999 |
9.07 | 9.069999999999999 |
9.08 | 9.079999999999998 |
9.09 | 9.089999999999998 |
Can someone help to suggest how to achieve this?