Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(python): ensure every type is properly normalised (for groupby_dynamic and groupby_rolling) #7238

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Feb 28, 2023

(As raised/spotted in the python-polars Discord).

When calling into either of these group functions directly from LazyFrame, the every param was not normalised to string-form if offset and period were None, meaning timedelta inputs would cause the following exception:

PanicException: expected a unit in the duration string

Fixed, and added some test coverage.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Feb 28, 2023
@alexander-beedie alexander-beedie changed the title fix(python): ensure period type is properly normalised (for groupby_dynamic and groupby_rolling) fix(python): ensure every type is properly normalised (for groupby_dynamic and groupby_rolling) Feb 28, 2023
… LazyFrame, ensure "every" type is properly normalised
@ritchie46 ritchie46 merged commit 41262b5 into pola-rs:master Feb 28, 2023
@alexander-beedie alexander-beedie deleted the timedelta-offset-fix branch February 28, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants