-
-
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: return an OrderedDict from read_excel with sheetname=None/list #9930 #9944
Conversation
Fix #9930 read_excel with sheetname=None or sheetname=[0,1,”Sheet5”] returns an OrderedDict instead of a dict
This still needs tests :). Take a look at the excel tests and update some or all of them to require sheets to appear in the original order. |
How can I run only this test ? I tried
I also tried
|
@scls19fr Take a look at these sections of the contributing guidelines (might be worth reading other sections, too!): (to be more specific, that error message means you need to rebuild pandas) |
I think this test could be good
But I won't send a new PR until I can run test on my side. |
I also wonder what should happen when a list is given as sheetname parameter. Should list order be preserved or should excel sheetname order be preserved ? |
I would preserve the excel sheetname order. The user already supplied a list of desired sheets, so they can access them in that order if desired. But if we reorder them to the supplied order, there is no way for them to access them in the original order. This rule is also simpler to explain. |
Preserving order defined by user will be (in my mind) both much easier to explain and much easier to implement. I don't see how we can preserve excel sheetname order easily. see
|
@scls19fr you don't need to open a new pull requests each time you update. just push to the same one. |
Sorry @jreback I still need to learn Git and GitHub |
To preserve original sheet order, you could use something like this:
|
@scls19fr pls add some tests. |
I'm sorry but I'm quite busy these days |
closing if/when updated, pls reopen |
Fix #9930
read_excel with sheetname=None or sheetname=[0,1,”Sheet5”] returns an OrderedDict instead of a dict
Follow-up of #9933