Skip to content

SortPermutation

🛈 DocStrings

A display-only sort order, see DataFrameModel.compute_sort_permutation.

Source code in src/cutepandas/pandasmodels/dataframemodel.py
@dataclass(frozen=True, slots=True)
class SortPermutation:
    """A display-only sort order, see `DataFrameModel.compute_sort_permutation`."""

    column: int
    descending: bool
    positions: np.ndarray
    """Row positions of the frame in display order (8 bytes per row)."""
    generation: int
    """Data generation of the model it was computed for (stale check)."""

generation instance-attribute

generation: int

Data generation of the model it was computed for (stale check).

positions instance-attribute

positions: ndarray

Row positions of the frame in display order (8 bytes per row).

:fa-brands-github: Show source on GitHub