Skip to content

ENH: Raise error writing excel file with a MultiIndexed DataFrame #9794 #9889

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

Merged
merged 1 commit into from
Apr 17, 2015

Conversation

hsperr
Copy link
Contributor

@hsperr hsperr commented Apr 13, 2015

Raise a NotImplementedError until fixed.

closes #9794

@@ -52,6 +52,8 @@ Enhancements

- Allow timedelta string conversion when leading zero is missing from time definition, ie `0:00:00` vs `00:00:00`. (:issue:`9570`)

- Trying to write an excel file now raises error if the DataFrame has a MultiIndex instead of writing a broken Excel file. (:issue:`9794`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raises a NotImplementedError

@jreback
Copy link
Contributor

jreback commented Apr 14, 2015

can you add a tests that validates this. otherwise looks good.

@jreback jreback added Error Reporting Incorrect or improved errors from pandas IO Excel read_excel, to_excel labels Apr 14, 2015
@jreback jreback added this to the 0.16.1 milestone Apr 14, 2015
@hsperr
Copy link
Contributor Author

hsperr commented Apr 14, 2015

Actually I just saw there is a some tests that test writing excel with multiindex

https://github.com/pydata/pandas/blob/master/pandas/io/tests/test_excel.py#L895

Referencing:
#5616

ill figure out what the difference is

@hsperr hsperr force-pushed the excel_multiindex branch from bbe6539 to fed64b3 Compare April 14, 2015 16:58
@hsperr
Copy link
Contributor Author

hsperr commented Apr 14, 2015

I added two tests that make sure writing MultiIndex index works and MultiIndex columns raise.
I added the assertRaises to the tests that failed

@hsperr hsperr force-pushed the excel_multiindex branch from fed64b3 to 3d515dd Compare April 14, 2015 18:05
@hsperr hsperr force-pushed the excel_multiindex branch from 3d515dd to a97113c Compare April 14, 2015 19:08
@hsperr
Copy link
Contributor Author

hsperr commented Apr 14, 2015

fixed the backticks in whats new and modified the test for multicolumn/index writing to assert fails only on multicolumn writes

jreback added a commit that referenced this pull request Apr 17, 2015
ENH: Raise error writing excel file with a MultiIndexed DataFrame #9794
@jreback jreback merged commit f9f88b2 into pandas-dev:master Apr 17, 2015
@jreback
Copy link
Contributor

jreback commented Apr 17, 2015

@hsperr thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERR: raise on mutli-index columns as its not implemented in to_excel
2 participants