alifestd_prune_extinct_lineages_asexual

alifestd_prune_extinct_lineages_asexual(phylogeny_df: DataFrame, mutate: bool = False, *, criterion: str = 'extant') DataFrame

Drop taxa without extant descendants.

The criterion column is used to determine extant taxa.

Fastest with records in working format. See alifestd_to_working_format.

Parameters

phylogeny_dfpandas.DataFrame

The phylogeny as a dataframe in alife standard format.

Must represent an asexual phylogeny.

mutatebool, default False

Are side effects on the input argument phylogeny_df allowed?

criterionstr, default “extant”

Column name used to determine extant taxa.

Raises

ValueError

If criterion is not a column in phylogeny_df.

Returns

pandas.DataFrame

The pruned phylogeny in alife standard format.