alifestd_mark_leaves_polars
- alifestd_mark_leaves_polars(phylogeny_df: DataFrame, *, mark_as: str = 'is_leaf') DataFrame
Add column is_leaf marking rows that are ancestor to no other row.
The output column name can be changed via the
mark_asparameter.Parameters
- phylogeny_dfpolars.DataFrame
The phylogeny as a dataframe in alife standard format.
Must represent an asexual phylogeny.
Returns
- polars.DataFrame
The phylogeny with an added is_leaf boolean column.
See Also
- alifestd_mark_leaves :
Pandas-based implementation.