Skip to content
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: Default for Excel sheetname #6573

Closed
clarkfitzg opened this issue Mar 7, 2014 · 5 comments · Fixed by #6576
Closed

ENH: Default for Excel sheetname #6573

clarkfitzg opened this issue Mar 7, 2014 · 5 comments · Fixed by #6576
Labels
API Design IO Excel read_excel, to_excel
Milestone

Comments

@clarkfitzg
Copy link
Contributor

Excel workbooks have 'Sheet1' as the default sheet. Can pd.read_excel have this as a default? pandas.io.excel.read_excel(io, sheetname='Sheet1', **kwds)

This makes pandas more accessible to the user transitioning from Excel by avoiding the common error below:

In [9]: test = pd.read_excel('/Users/clark/Desktop/test.xlsx')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-14880f6f18e4> in <module>()
----> 1 test = pd.read_excel('/Users/clark/Desktop/test.xlsx')

TypeError: read_excel() takes exactly 2 arguments (1 given)
@jreback jreback added this to the 0.14.0 milestone Mar 7, 2014
@jreback
Copy link
Contributor

jreback commented Mar 7, 2014

hmm...seems reasonable...PR for this?

@clarkfitzg
Copy link
Contributor Author

Sure, I'll submit a PR tonight.

@hayd
Copy link
Contributor

hayd commented Mar 8, 2014

Probably the default should be 0 (I think these can be accessed by number rather than name now?)

@jreback
Copy link
Contributor

jreback commented Mar 8, 2014

yep that is right!

@clarkfitzg
Copy link
Contributor Author

Then the first sheet will be loaded even if it doesn't have the name 'Sheet1'. Smart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants