(self)
| 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 | |
| 1236 | class FrameRowApply(FrameApply): |
no test coverage detected