namespaces.EraDataFrame

era_pl.namespaces.EraDataFrame(df)

Custom DataFrame helpers used throughout the Polars-facing API.

Methods

Name Description
map_by Apply fun to each group and preserve the grouping keys.

map_by

era_pl.namespaces.EraDataFrame.map_by(by, fun)

Apply fun to each group and preserve the grouping keys.

fun must accept a Polars DataFrame for one group and return a one-row Polars DataFrame. The grouping columns listed in by are reattached automatically to the returned result.