(cls, axis=0, numeric_axis: bool = True)
| 3271 | |
| 3272 | @classmethod |
| 3273 | def _validate_axis(cls, axis=0, numeric_axis: bool = True) -> None | Literal[0, 1]: |
| 3274 | if axis not in (0, 1, "index", "columns", None): |
| 3275 | raise ValueError(f"No axis named {axis}") |
| 3276 | if numeric_axis: |
| 3277 | num_axis: dict[str | None, Literal[0, 1]] = {"index": 0, "columns": 1} |
| 3278 | return num_axis.get(axis, axis) |
| 3279 | else: |
| 3280 | return axis |
| 3281 | |
| 3282 | @derived_from(pd.DataFrame, ua_args=["index"]) |
| 3283 | def rename(self, index=None, columns=None): |
no test coverage detected