How to add trailing zeroes to floating point value and export to excel as float(number)?
You could try df['column']=df['column'].astype(float). This would change for a float number.
If you back to string, Excel read as text.
I had read a file from excel and read as pandas dataframe.
I have to make few transformation in floating data type values.
I want to add trailing zeroes or change decimal places of the values.
For example:
25 to 25.0000
23.3 to 23.3000
24.55 to 24.5500
I have tried changing the values to str and then add zeroes.
But on exporting it back to excel ,I am getting string(text),which I want as numbers.
I have also tried Decimal library, but facing same issue while exporting.
kindly help guys.
I want to export file to excel so need to make changes accordingly.
Thank you