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

Method apply_str

pandas/core/apply.py:1225–1233  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1223 return result
1224
1225 def apply_str(self) -> DataFrame | Series:
1226 # Caller is responsible for checking isinstance(self.func, str)
1227 # TODO: GH#39993 - Avoid special-casing by replacing with lambda
1228 if self.func == "size":
1229 # Special-cased because DataFrame.size returns a single scalar
1230 obj = self.obj
1231 value = obj.shape[self.axis]
1232 return obj._constructor_sliced(value, index=self.agg_axis)
1233 return super().apply_str()
1234
1235
1236class FrameRowApply(FrameApply):

Callers 1

applyMethod · 0.95

Calls 2

_constructor_slicedMethod · 0.45
apply_strMethod · 0.45

Tested by

no test coverage detected