I use an API that returns a json string that I write to a csv file using pandas - to_csv
. Some of the fields are strings and some are numeric.
One of the fields is a long serial number written to csv in a scientific way and therefore its recent digits appear as zeros, for example:
json - 7052770924403150081
,
csv - 7.05277E+18
,
reading this csv in another python program - 7052770924403150000
How can I keep this number in the csv file as without any change? Of course without damaging the other fields in the file?
I tried float_format
but it did not help: df.to_csv (self.csv_video, float_format = '%f')
Would appreciate help.