Skip to content

Commit a06f9c7

Browse files
fbourgeymroeschke
andauthored
Update pandas/core/generic.py
Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 9ebd740 commit a06f9c7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/generic.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7488,8 +7488,7 @@ def replace(
74887488
return self.copy(deep=False)
74897489
if is_dict_like(to_replace):
74907490
if is_dict_like(value): # {'A' : NA} -> {'A' : 0}
7491-
is_series = isinstance(self, ABCSeries)
7492-
if is_series:
7491+
if isinstance(self, ABCSeries):
74937492
raise ValueError(
74947493
"Series.replace cannot use dict-like to_replace dict-like."
74957494
)

0 commit comments

Comments
 (0)