-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: replace with value also being replaced #46335
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
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.
lgtm, can you add a whatsnew note in regression section of 1.4.2 and ping on green.
pandas/core/internals/blocks.py
Outdated
type(self).replace, to_replace, value, inplace=True | ||
) | ||
blocks = [] | ||
nbs = self._split() |
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.
could write this entire section as a list-comprehension, but maybe not as readable
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.
good idea, i like the list comprehension better
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.
Went back to a non-list comprehension implementation as it requires unpacking.
@jreback - greenish |
@meeseeksdev backport 1.4.x |
Something went wrong ... Please have a look at my logs. |
Co-authored-by: Luke Manley <[email protected]>
@@ -18,6 +18,7 @@ Fixed regressions | |||
- Fixed regression in :func:`read_csv` killing python process when invalid file input was given for ``engine="c"`` (:issue:`45957`) | |||
- 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.replace` when a replacement value was also a target for replacement (:issue:`46335`) |
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.
will change the issue number to #46306 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.
done in #46354
doc/source/whatsnew/v1.4.2.rst