Skip to content

Commit 03b131a

Browse files
committed
Merge pull request #11329 from jreback/replace
BUG: Bug in DataFrame.replace with a datetime64[ns, tz] and a non-compat to_replace #11326
2 parents 7e5b223 + 2cda523 commit 03b131a

File tree

7 files changed

+443
-264
lines changed

7 files changed

+443
-264
lines changed

doc/source/whatsnew/v0.17.1.txt

+6
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,15 @@ 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`)
7778

79+
80+
- Bug in ``DataFrame.replace`` with a ``datetime64[ns, tz]`` and a non-compat to_replace (:issue:`11326`, :issue:`11153`)
81+
82+
83+
7884
- Bug in list-like indexing with a mixed-integer Index (:issue:`11320`)
7985

8086

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)