alifestd_try_add_ancestor_id_col
- alifestd_try_add_ancestor_id_col(phylogeny_df: DataFrame, mutate: bool = False) DataFrame
Add an ancestor_id column to the input DataFrame if the phylogeny is asexual and the column does not already exist.
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.