group_names

function of dascore.utils.display source

group_names(
    frame: DataFrame ,
    ignore: collections.abc.Iterable[str] = (),
    ordinals: collections.abc.Iterable | None[Iterable, None] = None,
    fallback: str | None[str, None] = None,
)-> ‘list[str]’

Name each row of a group frame by what tells it apart from the others.

The one naming rule a spool has, kept apart from the drawing of it so a coverage plot’s lanes and a spool repr’s tracks are named the same way. The same way, not always the same name: both callers fall back on the same attribute, but they partition their rows differently and number an unnameable group differently – the plot by its group_id, a repr by row position.

Parameters

Parameter Description
frame One row per group.
ignore Columns which describe the groups rather than tell them apart,
such as the extent each is measured over. A column whose name
begins with an underscore is skipped whether it is named here
or not.
ordinals What to call a group its own values cannot name. The row’s
position by default; a report passes its group_id.
fallback A column to name a group by when nothing tells it apart, asked
before the ordinal is.