-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: multi-index to_native_types is not passing thru parameters #11551
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
return self.values | ||
# we go through the levels and format them | ||
levels = [_._format_native_types(**kwargs) for _ in self.levels] | ||
mi = MultiIndex(levels=levels, labels=self.labels, |
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.
also add names=self.names
couple of comments. pls also add a whatsnew note (bug fix section) |
Hum, For a plain index:
and that's cool, but for a multi-index:
so there are no
|
You are setting everything to the index, which collapses the frame.
having nans in an index is quite odd and only semi-supported, meaning some edge cases exist. |
Even when there is a third column
If this is an "edge case", I'm pushing what I have done so far:
What I have NOT done:
|
ok, this looks good. pls squash and ping when green. |
@@ -120,3 +120,6 @@ Bug Fixes | |||
- Bug in ``to_excel`` with openpyxl 2.2+ and merging (:issue:`11408`) | |||
|
|||
- Bug in ``DataFrame.to_dict()`` produces a ``np.datetime64`` object instead of ``Timestamp`` when only datetime is present in data (:issue:`11327`) | |||
|
|||
|
|||
- Bug in ``DataFrame.to_csv`` with argument ``date_format`` when dealing with MultiIndexes (:issue:`7791`) |
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.
say something like bug in DataFrame.to_csv
in passing thru arguments for formatting MultiIndexes
, including date_format
All done |
merged via 9cbe8b9 thanks! |
closes #7791
xref #6797