alifestd_mark_lineage_cumprod_polars

alifestd_mark_lineage_cumprod_polars(phylogeny_df: DataFrame, values: str | Expr, *, mark_as: str = 'lineage_cumprod', reverse: bool = False, skipna: bool = True) DataFrame

Add column with cumulative product of values along each lineage.

With reverse=False (default), the result at each node is the product of values along the path from the root to that node, inclusive. With reverse=True, the result at each node is the product of values over the entire clade rooted at that node, inclusive.

See Also

alifestd_mark_lineage_cumprod_asexual :

Pandas-based implementation.