MCPcopy Index your code
hub / github.com/dask/dask / _validate_axis

Function _validate_axis

dask/dataframe/dask_expr/_util.py:56–64  ·  view source on GitHub ↗
(axis=0, none_is_zero: bool = True)

Source from the content-addressed store, hash-verified

54
55
56def _validate_axis(axis=0, none_is_zero: bool = True) -> None | Literal[0, 1]:
57 if axis not in (0, 1, "index", "columns", None):
58 raise ValueError(f"No axis named {axis}")
59 # convert to numeric axis
60 numeric_axis: dict[str | None, Literal[0, 1]] = {"index": 0, "columns": 1}
61 if none_is_zero:
62 numeric_axis[None] = 0
63
64 return numeric_axis.get(axis, axis)
65
66
67def _convert_to_list(column) -> list | None:

Callers 6

methodFunction · 0.90
ffillMethod · 0.90
bfillMethod · 0.90
shiftMethod · 0.90
diffMethod · 0.90
dropMethod · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…