-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Thousands separator for to_csv #30045
New issue
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
Comments
It's formatted as This seems a bit complex, since you would end up needing to quote the number, right? |
Assuming a given df contains 1000, passing
If the column separator is set to |
Seems like a relatively niche need, and no activity on this in the past year. Maybe we can close this until further notice? |
I don't see the point of closing issues whereby your users have expressed a
legitimate and verified shortcoming of the software, albeit judged a
"niche" one.
Closing reduces visibility and therefore potential for a contributor to
confirm this is needed and start working on it.
If the problem you are trying to solve is issue backlog management, then
an appropriate tagging strategy would help (if not already in place).
Closing issues you _personally_ don't care about won't.
Le ven. 18 déc. 2020 à 00:30, Rui Bastos <[email protected]> a
écrit :
… Seems like a relatively niche need, and no activity on this in the past
year. Maybe we can close this until further notice?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#30045 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAO7U36CQRQE5HTGFGCTI5LSVKICRANCNFSM4JVIQ7TA>
.
|
Sorry if my comment was rude in any way. Still learning the ropes of contributing and was just trying to be helpful. I can't add tags, but I see how that would be more helpful than simply closing the issue. In the interest of continued discussion, could you maybe expand how this feature would be useful? |
When manipulating CSV files containing very large numbers (money, quantity, counts), using a thousand separator, usually |
Right now, the thousands separator seems to be affected by general Windows setting - but I have not found a way to change this setting for programs ran as System user... Therefore, possibility to set thousands separator to to_csv method would be very useful in my case! |
Pandas exposes a
thousands
optional parameter toread_csv
used to specify a custom thousands separator, so that1,000
or1_000
can be successfully parsed to a numeral in the resulting DataFrame.Unfortunately, Pandas is missing the very same parameter for
to_csv
, so that a DataFrame containing1000
ends up serialized to csv as1,000
or1_000
.I understand the general issue of custom float formatting in Pandas remains open (see #4668) and may not even find a solution. However, this particular use case sounds a bit more accessible, since it has been done successfully for
read_csv
.The text was updated successfully, but these errors were encountered: