MCPcopy
hub / github.com/pandas-dev/pandas / re_replacer

Function re_replacer

pandas/core/array_algos/replace.py:137–141  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

135 if isna(value) or not isinstance(value, str):
136
137 def re_replacer(s):
138 if is_re(rx) and isinstance(s, str):
139 return value if rx.search(s) is not None else s
140 else:
141 return s
142
143 else:
144 # value is guaranteed to be a string here, s can be either a string

Callers

nothing calls this directly

Calls 2

is_reFunction · 0.85
subMethod · 0.45

Tested by

no test coverage detected