-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Regression in loc.setitem losing mi names when df is empty #46322
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
thanks @phofl |
…es when df is empty
@meeseeksdev backport 1.4.x |
Something went wrong ... Please have a look at my logs. |
… is empty (#46334) Co-authored-by: Patrick Hoefler <[email protected]>
@@ -17,6 +17,7 @@ Fixed regressions | |||
- Fixed regression in :meth:`DataFrame.drop` and :meth:`Series.drop` when :class:`Index` had extension dtype and duplicates (:issue:`45860`) | |||
- Fixed memory performance regression in :meth:`Series.fillna` when called on a :class:`DataFrame` column with ``inplace=True`` (:issue:`46149`) | |||
- Provided an alternative solution for passing custom Excel formats in :meth:`.Styler.to_excel`, which was a regression based on stricter CSS validation. Examples available in the documentation for :meth:`.Styler.format` (:issue:`46152`) | |||
- Fixed regression in :meth:`DataFrame.loc.__setitem__` losing :class:`MultiIndex` names if :class:`DataFrame` was empty before (:issue:`46317`) |
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.
:meth:DataFrame.loc.__setitem__
not a valid ref. will change in a release note tidy up
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.
What would be valid here? (For future references)
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.
in 1.4.1 release notes https://pandas.pydata.org/pandas-docs/dev/whatsnew/v1.4.1.html#fixed-regressions , I changed it to
Regression when setting values with DataFrame.loc() losing Index name if DataFrame was empty before (GH45621)
will probably do similar
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.
done in #46354
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.