Skip to content

SortableSource

Base classes

Name Children Inherits
Protocol
typing
Base class for protocol classes.

⋔ Inheritance diagram

graph TD
  2861161141["source.SortableSource"]
  1073422405["typing.Protocol"]
  3481597255["typing.Generic"]
  2751680898["builtins.object"]
  1073422405 --> 2861161141
  3481597255 --> 1073422405
  2751680898 --> 3481597255

🛈 DocStrings

Bases: Protocol

Optional hook: a source that can return a sorted copy of its frame.

Source code in src/cutepandas/frames/source.py
@runtime_checkable
class SortableSource(Protocol):
    """Optional hook: a source that can return a sorted copy of its frame."""

    def sort(self, column: int, descending: bool = False) -> Any:
        """Return a new native frame, sorted stably by one column, nulls last."""
        ...

sort

sort(column: int, descending: bool = False) -> Any

Return a new native frame, sorted stably by one column, nulls last.

Source code in src/cutepandas/frames/source.py
def sort(self, column: int, descending: bool = False) -> Any:
    """Return a new native frame, sorted stably by one column, nulls last."""
    ...

:fa-brands-github: Show source on GitHub