Rolling mode in Polars
I have a ~100M rows long data frame containing IDs in different groups. Some of them are wrong (indicated by the 99). I am trying to correct them with a rolling mode window, similar to the code example below. Is there a better way to do this, since rolling_map() is super slow?
Rolling mode in Polars
I have a ~100M rows long data frame containing IDs in different groups. Some of them are wrong (indicated by the 99). I am trying to correct them with a rolling mode window, similar to the code example below. Is there a better way to do this, since rolling_map() is super slow?
Rolling mode in Polars
I have a ~100M rows long data frame containing IDs in different groups. Some of them are wrong (indicated by the 99). I am trying to correct them with a rolling mode window, similar to the code example below. Is there a better way to do this, since rolling_map() is super slow?
Rolling mode in Polars
I have a ~100M rows long data frame containing IDs in different groups. Some of them are wrong (indicated by the 99). I am trying to correct them with a rolling mode window, similar to the code example below. Is there a better way to do this, since rolling_map() is super slow?
Create date_range with predefined number of periods in polars
When I create a date range in pandas
, I often use the periods
argument. Something like this:
Compute the number of unique combinations while excluding those containing missing values
I’d like to count the number of unique values when combining several columns at once. My idea so far was to use pl.struct(...).n_unique()
, which works fine when I consider missing values as a unique value:
Compute the number of unique combinations while excluding those containing missing values
I’d like to count the number of unique values when combining several columns at once. My idea so far was to use pl.struct(...).n_unique()
, which works fine when I consider missing values as a unique value:
Compute the number of unique combinations while excluding those containing missing values
I’d like to count the number of unique values when combining several columns at once. My idea so far was to use pl.struct(...).n_unique()
, which works fine when I consider missing values as a unique value:
Compute the number of unique combinations while excluding those containing missing values
I’d like to count the number of unique values when combining several columns at once. My idea so far was to use pl.struct(...).n_unique()
, which works fine when I consider missing values as a unique value:
Compute the number of unique combinations while excluding those containing missing values
I’d like to count the number of unique values when combining several columns at once. My idea so far was to use pl.struct(...).n_unique()
, which works fine when I consider missing values as a unique value: