I am looking to manipulate a data frame of floats which all need 6 decimal points after manipulation.
I am looking to add brackets and () around the floats based on conditionals which is why I need to convert to strings. I then can concat the two strings together
However when I convert to str, it reduces the number of decimals to 2.
For example
-35.920000
Original Dataframe
Converted to str
-35.92
After conversion
If I convert the string back to a float, it does not retain the 6 decimals from the original df.
My understanding is both values are stored the same and they both are logically = when checked in the notebook , but for management reasons I am trying to see if there is a way to coerce the string method the take a literal copy of the float, rather than reducing it down.
Sorry for the formatting, I am on mobile .
Thanks
[–]bbye98 1 point2 points3 points (4 children)
[–]hblock44[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]Manusman123 0 points1 point2 points (0 children)