MCPcopy Create free account
hub / github.com/dask/dask / _validate_axis

Method _validate_axis

dask/dataframe/dask_expr/_collection.py:3267–3274  ·  view source on GitHub ↗
(cls, axis=0, numeric_axis: bool = True)

Source from the content-addressed store, hash-verified

3265
3266 @classmethod
3267 def _validate_axis(cls, axis=0, numeric_axis: bool = True) -> None | Literal[0, 1]:
3268 if axis not in (0, 1, "index", "columns", None):
3269 raise ValueError(f"No axis named {axis}")
3270 if numeric_axis:
3271 num_axis: dict[str | None, Literal[0, 1]] = {"index": 0, "columns": 1}
3272 return num_axis.get(axis, axis)
3273 else:
3274 return axis
3275
3276 @derived_from(pd.DataFrame, ua_args=["index"])
3277 def rename(self, index=None, columns=None):

Callers 3

clipMethod · 0.95
applyMethod · 0.95
_comparison_opMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected