-
-
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
ENH: inconsistent naming convention for read_csv and read_excel column selection #4988
Comments
That seems reasonable, however we'd probably still have to support the old parameter. My impression is that the only difference is that parse_cols accept a single int: clearly csv can't support the string option, given that it's excel specific and it already accepts a list of int (and I'm sure it accepts None as well). |
@jtratner Maybe adding |
I can take this if you decide this is reasonable to implement... The question is just what to do with the test cases? Test both or test just the |
you are talking about |
@jreback I proposed a change from But if I noticed correctly the naming conventions are going toward the |
@alefnula while I get what you're saying, I don't know if it really makes sense to change those keyword arguments now (and |
@jtratner I think you misunderstood me, but it's my fault, I wasn't clear enough :) So I'll start fresh. I went through the code of the
The conclusion is: Most of the functions that have a column selection parameter use My suggestion is to:
This is basically the proposal I had in mind :) I just wasn't clear enough. |
If someone is interested in this, we should deprecate |
taking a look at this, I plan to deprecate |
in the current release version (0.20.1), a list of columns returns an empty DF. I.E.
rather than the expected DataFrame with columns A, B, and D. I plan to address this as well to implement @alefnula's point 3. |
@gfyoung anything worth changing for 0.21.0 for this? (prob in |
@jreback : I agree with you from a year ago that |
Will now use "usecols" just like in read_csv. xref pandas-devgh-4988.
read_csv
uses theusecols
parameter, and theread_excel
function usesparse_cols
parameter. Both parameter do basically the same thing:Also maybe supporting the same thing that
parse_cols
does inusecol
wouldn't be so bad?The text was updated successfully, but these errors were encountered: