Skip to content

Commit 2cda523

Browse files
committed
CLN: clean up internal impl of fillna/replace, xref #11153
1 parent 849bc7d commit 2cda523

File tree

7 files changed

+423
-266
lines changed

7 files changed

+423
-266
lines changed

doc/source/whatsnew/v0.17.1.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ Bug Fixes
7272

7373
- Bug in ``HDFStore.select`` when comparing with a numpy scalar in a where clause (:issue:`11283`)
7474

75+
7576
- Bug in tz-conversions with an ambiguous time and ``.dt`` accessors (:issue:`11295`)
7677
- Bug in comparisons of Series vs list-likes (:issue:`11339`)
77-
- Bug in ``DataFrame.replace`` with a ``datetime64[ns, tz]`` and a non-compat to_replace (:issue:`11326`)
78+
79+
80+
- Bug in ``DataFrame.replace`` with a ``datetime64[ns, tz]`` and a non-compat to_replace (:issue:`11326`, :issue:`11153`)
81+
7882

7983

8084
- Bug in list-like indexing with a mixed-integer Index (:issue:`11320`)

pandas/core/generic.py

-2
Original file line numberDiff line numberDiff line change
@@ -2999,8 +2999,6 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None,
29992999
'{0!r}').format(type(to_replace).__name__)
30003000
raise TypeError(msg) # pragma: no cover
30013001

3002-
new_data = new_data.convert(copy=not inplace, numeric=False)
3003-
30043002
if inplace:
30053003
self._update_inplace(new_data)
30063004
else:

0 commit comments

Comments
 (0)