-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
change the index in DataFrame.to_csv to False as default? #46583
Comments
i suspect this is a widely used method. changing might cause more problems that the observed benefits. not convinced that a default of false is more readily used than true across all users and cases. |
Ok, have only seen False in all codes I have seen in 4y, have also seen in examples/how-to that they recommend False. Hope you can take in consideration to future releases, changes in the standard parameters is common, I think the community can handle it. |
Most of the code I've seen (within our org) either drops the "Unnamed ..." index column as the very first thing when reading a csv output by The few times it is useful (when writing the result of a pivot / groupby operation directly without resetting the index) is a minority. That said, and as much as I'd like to see the default being changed - it's unlikely to change (#34576 in addition to the ones listed above) |
Thanks for raising the issue, but additionally the core sticking point is that the Index is assumed a necessary component of a pandas DataFrame (for better or worse), so if the index (or axes in general) would ever be made optional this change would be more welcome. Closing for now as discussed in the linked issues |
Maybe it’s time in some future release change the index in DataFrame.to_csv to False as default? Just a feeling that many change it manually from True to False every time using it...
Thanks for a 10/10 product!
The text was updated successfully, but these errors were encountered: