alifestd_mark_is_left_child_asexual

alifestd_mark_is_left_child_asexual(phylogeny_df: DataFrame, mutate: bool = False, *, mark_as: str = 'is_left_child') DataFrame

Add column is_left_child, containing for each node whether it is the smaller-id child.

The output column name can be changed via the mark_as parameter.

Root nodes will be marked False. Tree must be strictly bifurcating.

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

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.