-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
read_excel does not raise error with wrong keyword arg #17994
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
This may be little tricky, since IIRC we pass through |
@TomAugspurger : You are correct regarding |
Hmm, we could maybe explicitly check for some common mistakes (like |
@TomAugspurger : I think we should look into expanding the signature to obviate the need for |
@TomAugspurger: I’m not an experienced programmer, but I could try something. What about something as simple as if parameter passed not in a list of allowed parameters, raise an error? |
@lucianoviola : That sounds like a good plan. Refer to |
@gfyoung Ok! |
+1. I just got bitten by |
Hey guys, I'm having a bit of difficulty figuring out how to solve this one. I'm new to open source contributing, but I'm really excited about it. My initial solution was to raise a warning if "sheet" was in kwargs, it does not generalize to things like "Sheet". So, in my view, we either list all possible misspellings and and confusion possibilities of sheetname and check directly check it they where passed, or we review the need to have kwargs. I don't think that words like "Sheet' are such a problem, I don't think its a very common mistake. The one I'm concerned about is "sheet". What do you guys think? =) |
I think the goal is to remove the `**kwargs` from the signature. Then we
don't have to worry about validating unknown parameters.
…On Fri, May 25, 2018 at 8:50 AM, Luciano Viola ***@***.***> wrote:
Hey guys, I'm having a bit of difficulty figuring out how to solve this
one. I'm new to open source contributing, but I'm really excited about it.
My initial solution was to raise a warning if "sheet" was in kwargs, it
does not generalize to things like "Sheet".
So, in my view, we either list all possible misspellings and and confusion
possibilities of sheetname and check directly check it they where passed,
or we review the need to have kwargs.
I don't think that words like "Sheet' are such a problem, I don't think
its a very common mistake. The one I'm concerned about is "sheet".
What do you guys think? =)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17994 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHInNXhjgshmcamekAWgLFLrFX_H0bks5t2Aw8gaJpZM4QH-GS>
.
|
* ENH: Raise error for read_excel possible "sheet" argument in kwargs (#17994)
* ENH: Raise error for read_excel possible "sheet" argument in kwargs (pandas-dev#17994)
For example:
does not raise any error. The right parameter name is "sheetname" . If "sheet" is passed it defaults to the first sheet and no error is raised.
sheetname and sheet are very similar and easy to confuse.
One might think that it is reading the sheet passed as argument when in fact it is another one.
I would like to suggest for errors to be raised if unexpected args are passed.
The text was updated successfully, but these errors were encountered: