Skip to content

Commit 63a1216

Browse files
committed
internal_replace: applymap removal
1 parent f93df24 commit 63a1216

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

code/recipes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,8 +2432,7 @@ def internal_replace(self, df=None, desc=None):
24322432
for r in self.args["regex"]:
24332433
regex.append([re.compile(list(r.keys())[0]), r[list(r.keys())[0]]])
24342434
pd.options.mode.chained_assignment = None
2435-
df[self.cols] = df[self.cols].applymap(
2436-
lambda x: replace_regex(x, regex))
2435+
df[self.cols] = df[self.cols].apply(lambda col: col.apply(replace_regex))
24372436
return df
24382437
else:
24392438
return df

0 commit comments

Comments
 (0)