alifestd_from_avida_spop_polars
- alifestd_from_avida_spop_polars(spop_text: str, *, create_ancestor_list: bool = True, dtype_id: DataType | None = Int64) DataFrame
Convert Avida
.spoppopulation snapshot text to a phylogeny dataframe.Parses the text content of an Avida
.spop(structured population) file and returns a polars DataFrame in alife standard format.Parameters
- spop_textstr
Full text content of an Avida
.spopfile.- create_ancestor_listbool, default True
If True, include an
ancestor_listcolumn in the result.- dtype_idpl.DataType or None, default pl.Int64
Polars dtype for the
idcolumn. If None, the smallest signed integer dtype is chosen automatically based on the number of rows in the data.
Returns
- pl.DataFrame
Phylogeny dataframe in alife standard format.
See Also
- alifestd_from_avida_spop :
Pandas-based implementation.
Raises
- ValueError
If the
#formatheader is missing from the spop text.