-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
API: Deprecate skip_footer in read_csv #13386
Conversation
23c07a2
to
b563179
Compare
In light of removing duplicate arguments and stripping down the API a bit, here are a couple of others I would like to propose (perhaps not in this PR but for discussion nonetheless):
|
the problem is that we also have |
Hmmm...that's a flip-flop AFAICT from what you said earlier here. However, deprecating |
just change it internally to the correct kw. I think they diverged at some point. It looks (just a quick skim), that |
@jreback : let's actually do the count of multi-word argument names (excluding the Arguments that use Arguments that don't use Even excluding ones that have been recently deprecated ( |
@gfyoung I am trying to minimize back-compat pain.
|
Current coverage is 85.23% (diff: 100%)@@ master #13386 diff @@
==========================================
Files 140 140
Lines 50420 50419 -1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 42975 42975
+ Misses 7445 7444 -1
Partials 0 0
|
b563179
to
4560c12
Compare
@jreback : I have no issues waiting until |
fdb6f97
to
85a58f5
Compare
ec04105
to
5ae47e9
Compare
f675a02
to
e6a72c8
Compare
I would lean against this change -- I don't think deprecating or even adding aliases with underscores for these keywords is worth it. Yes, consistency is nice, but these are keywords that are mostly either (a) copied straight from the API docs or an example or (b) auto-completed. Omitting underscores between lower case words is also common enough in PEP8 compliant code that it doesn't hurt my eyes in the way that camelCase would, for example. I would save changes like this for next time somebody writes a DataFrame library ;). There's just very little upside to the change at this point. |
I'd also be inclined to not do this. Consistency is great, but to me, big breaking (or warning triggering) changes for consistency are only worth it to the extent they actually improve the user experience. E.g. This doesn't seem to meet that hurdle. Like @shoyer said, these argument would be typically tab-completed or looked up, or even if not, the inconsistency doesn't cause any confusion. |
To put things in perspective, this whole discussion was generated because I wanted to remove the duplicate 'skipfooter/skip_footer' argument in the signature. It really should only be one of the two IMO. The consistency part came up because we weren't sure which way to go i.e do we take the underscore version or the non-underscore? I perfectly understand if we don't want to make such a change as drastic as it has become, though some input on the initial goal would be good then. |
I don't have a strong opinion on that, but given that all the docs / SO answers / etc in the wild use |
In light of the push back, I will rollback my changes and just deprecate |
e6a72c8
to
1fdc1ae
Compare
@jreback , @jorisvandenbossche : Rolled back my changes successfully (i.e. Travis is passing) to just deprecating |
lgtm. @jorisvandenbossche |
@jorisvandenbossche : any updates on this? |
What do we do other |
Same as here pre-PR (i.e. it just accepts both of them). However, I will handle all other cases similarly if this one is merged. |
@jorisvandenbossche : Any updates on this? |
1fdc1ae
to
3208f02
Compare
@@ -1351,7 +1351,7 @@ back to python if C-unsupported options are specified. Currently, C-unsupported | |||
options include: | |||
|
|||
- ``sep`` other than a single character (e.g. regex separators) | |||
- ``skip_footer`` | |||
- ``skipfooter`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did the doc-string get changed (to add DEPRECATED)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm...not sure where those changes went. Added them back.
3208f02
to
9ddb3bf
Compare
9ddb3bf
to
d21345f
Compare
@jreback : added the documentation back about the deprecation, and Travis is still happy after rebase. Ready to merge if there are no other concerns. |
thanks @gfyoung |
Deprecated back in 0.19.0. xref pandas-devgh-13386.
Deprecated back in 0.19.0. xref pandas-devgh-13386.
Deprecated back in 0.19.0. xref gh-13386.
Title is self-explanatory.
Closes gh-13349 and partially undoes this commit back in
v0.9.0
. With such a massive API now, having duplicate arguments makes managing it way less practical.