read_excel does not raise error with wrong keyword arg
See original GitHub issueFor example:
pd.read_excel('file_name.xlsx',sheet='mysheet')
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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
valid parameters to pandas method - python - Stack Overflow
Pandas take keyword arguments **kwds as an argument in read_excel function, that's why it is not throwing error. pandas.pydata.org/pandas-docs/ ...
Read more >What's new in 1.3.0 (July 2, 2021) - Pandas
When incorrectly formatted CSS is given via Styler.apply() or Styler.applymap() , an error is now raised upon rendering (GH39660).
Read more >Reading Poorly Structured Excel Files with Pandas
The simplest solution for this data set is to use the header and usecols arguments to read_excel() . The usecols parameter, in particular,...
Read more >How IOError work in Python with Programming Examples
The primary use of finally here will be to execute the code no matter what error is caught or handled. Conclusion. IOError in...
Read more >Read Messy Excel Files Like a Pro | by Tim Meehan
One thing to note is the pd.read_excel() file will usually return ... You've most likely used it before, but it has a handy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1. I just got bitten by
sheet_name
.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 notifications@github.com wrote: