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

Method _validate_axis

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

Source from the content-addressed store, hash-verified

3301
3302 @classmethod
3303 def _validate_axis(cls, axis=0, numeric_axis: bool = True) -> None | Literal[0, 1]:
3304 if axis not in (0, 1, "index", "columns", None):
3305 raise ValueError(f"No axis named {axis}")
3306 if numeric_axis:
3307 num_axis: dict[str | None, Literal[0, 1]] = {"index": 0, "columns": 1}
3308 return num_axis.get(axis, axis)
3309 else:
3310 return axis
3311
3312 @derived_from(pd.DataFrame, ua_args=["index"])
3313 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