Skip to content

Add DataFrame.partition_by/2 - #1163

Open
georgeguimaraes wants to merge 1 commit into
elixir-explorer:mainfrom
georgeguimaraes:partition-by
Open

georgeguimaraes wants to merge 1 commit into
elixir-explorer:mainfrom
georgeguimaraes:partition-by

Conversation

@georgeguimaraes

Copy link
Copy Markdown

One dataframe per distinct combination of the given columns, in the order each combination first appears, backed by Polars' partition_by. Every piece keeps all the columns and a lazy frame is collected first.

Fitting one model per time series in a frame, or one per store or sensor, needs exactly this split, and the alternative today is distinct followed by one filter_with per key, which reads the frame once per group.

Splits a dataframe into one dataframe per distinct combination of the
given columns, in the order each combination first appears, through
Polars' partition_by. Lazy dataframes are collected first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant