-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: to_excel duplicate columns #11237
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
Conversation
self.rowcounter = 0 | ||
self.na_rep = na_rep | ||
self.columns = cols | ||
if cols is None: | ||
if cols is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.df = df
if cols is not None:
self.df = self.df.reindex(columns=cols)
self.columns = self.df.columns
@jreback - updated for youf comments. |
@@ -1375,6 +1388,22 @@ def test_swapped_columns(self): | |||
tm.assert_series_equal(write_frame['A'], read_frame['A']) | |||
tm.assert_series_equal(write_frame['B'], read_frame['B']) | |||
|
|||
def test_invalid_columns(self): | |||
_skip_if_no_xlrd() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the issue number here
pls squash otherwise lgtm. |
Nice! |
can you rebase/squash |
eae8124
to
dba4d1f
Compare
@jreback this is squashed now |
BUG: to_excel duplicate columns
thanks! |
closes #11007
closes #10970 (data in wrong order)
closes #10982 (columns lost).
Using the approach suggested here
All three occurred when using
to_excel
with duplicate columns in theDataFrame