-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
read_csv/to_csv sep/delimiter inconsistency #7662
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
related to #7615 to_csv allows **kwargs and then can do things like accept delimiter for sep (must be a reason to_csv accepts **kwargs but don't remember why/when was changed) |
👍 Spent about an hour trying to figure out why passing "delimiter" does not affect the "to_csv" call ... |
Will try to fix this if nobody started. Relevant code: to_csv => Line 1303 in ee374ee
read_csv => https://github.com/pandas-dev/pandas/blob/master/pandas/io/parsers.py#L565 |
@indera : Just what are you trying to fix exactly? The |
Yes, this is fixed in pandas==0.19.0 I get an error as expected: TypeError: to_csv() got an unexpected keyword argument 'delimiter' |
@gfyoung - we should probably now remove support for "delimiter" in read_csv for consistency ;) |
@indera the difference is that for |
@jorisvandenbossche : It wouldn't be that hard to incorporate into the |
Consistency is nice, but the recommended one |
That's fair, though we could consider deprecating |
@gfyoung deprecating |
@jorisvandenbossche @jreback : Thoughts? |
@gfyoung wrote:
Any update on this? Is 'not now' now? |
@jorisvandenbossche @jreback : Thoughts? |
At the moment, |
The above pull request was closed due to stalling and never merged. The inconsistency remains, which I just encountered. Used |
@jandren happy to take a new PR to deprecate |
Thanks for the opportunity @jreback! My intention was to just give updated feedback and poke the issue as still alive. I have to little knowledge about the pros and cons of |
related #7615
Bit of a UI problem here (although it's behaving as the docstring says it does, so it doesn't quite qualify as a bug):
read_csv
accepts bothsep
anddelimiter
butto_csv
silently ignoresdelimiter
. Someone was recently tripped up by this on SO. I'm fine with either teachingto_csv
to behave the same wayread_csv
does or, alternatively, raising ifdelimiter
is found as a keyword.That is, I'm less bothered by the inconsistency than the silent unexpected behaviour.
The text was updated successfully, but these errors were encountered: