alifestd_delete_unifurcating_roots_asexual

alifestd_delete_unifurcating_roots_asexual(phylogeny_df: DataFrame, mutate: bool = False, root_ancestor_token: str = 'none') DataFrame

Pare record to bypass root nodes with only one descendant.

Dataframe reindexing (e.g., df.index) may be applied.

See also alifestd_collapse_unifurcations.

The option root_ancestor_token will be sandwiched in brackets to create the ancestor list entry for genesis organisms. For example, the token “None” will yield the entry “[None]” and the token “” will yield the entry “[]”. Default “none”.

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.