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

Method _str_count

pandas/core/strings/object_array.py:118–121  ·  view source on GitHub ↗
(self, pat, flags: int = 0)

Source from the content-addressed store, hash-verified

116 return result
117
118 def _str_count(self, pat, flags: int = 0):
119 regex = re.compile(pat, flags=flags)
120 f = lambda x: len(regex.findall(x))
121 return self._str_map(f, dtype="int64")
122
123 def _str_pad(
124 self,

Callers 1

countMethod · 0.45

Calls 2

_str_mapMethod · 0.95
findallMethod · 0.80

Tested by

no test coverage detected