We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be good if the DataFrame.to_csv method would support specifying the string format to use.
DataFrame.to_csv
The text was updated successfully, but these errors were encountered:
Can you be more specific about what you'd like DataFrame.to_csv to be able to do? A short mock example would be really helpful.
Sorry, something went wrong.
something along the lines of
df = [[0.123456, 0.234567, 0.567567], [12.32112, 123123.2, 321321.2]] df.to_csv(filename, fmt='%.2g', sep=';')
df = [[0.123456, 0.234567, 0.567567], [12.32112, 123123.2, 321321.2]]
df.to_csv(filename, fmt='%.2g', sep=';')
yields
0.12;0.23;0.57 ...
0.12;0.23;0.57
...
alternatively, the fmt parameter from to_string would be helpful, as well.
fmt
to_string
Make sense. Thanks.
ENH: format string for to_csv #1525
3942eb0
I added a float_format keyword argument to to_csv and to_excel
float_format
No branches or pull requests
It would be good if the
DataFrame.to_csv
method would support specifying the string format to use.The text was updated successfully, but these errors were encountered: