MCPcopy
hub / github.com/pandas-dev/pandas / _set_axis

Method _set_axis

pandas/core/generic.py:748–754  ·  view source on GitHub ↗

This is called from the cython code when we set the `index` attribute directly, e.g. `series.index = [1, 2, 3]`.

(self, axis: AxisInt, labels: AnyArrayLike | list)

Source from the content-addressed store, hash-verified

746
747 @final
748 def _set_axis(self, axis: AxisInt, labels: AnyArrayLike | list) -> None:
749 """
750 This is called from the cython code when we set the `index` attribute
751 directly, e.g. `series.index = [1, 2, 3]`.
752 """
753 labels = ensure_index(labels)
754 self._mgr.set_axis(axis, labels)
755
756 @final
757 def droplevel(self, level: IndexLabel, axis: Axis = 0) -> Self:

Callers 1

__init__Method · 0.80

Calls 2

ensure_indexFunction · 0.85
set_axisMethod · 0.45

Tested by

no test coverage detected