alifestd_mark_roots

alifestd_mark_roots(phylogeny_df: DataFrame, mutate: bool = False, *, mark_as: str = 'is_root') DataFrame

Create column is_root to mark rows with no ancestor.

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

Input dataframe is not mutated by this operation unless mutate set True. If mutate set True, operation does not occur in place; still use return value to get transformed phylogeny dataframe.