alifestd_mark_next_sibling_id_polars

alifestd_mark_next_sibling_id_polars(phylogeny_df: DataFrame, *, mark_as: str = 'next_sibling_id') DataFrame

Add column next_sibling_id, the next-highest id sharing the same parent.

The output column name can be changed via the mark_as parameter.

If no such sibling exists, marks own id.