-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
groupby_dynamic()
on empty LazyFrame raises index out of bounds on collect()
#6288
Closed
2 tasks done
Comments
If it helps, this is the full backtrace:
|
Another example which gives a different error, when calling
|
Update:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
I want to use
groupby_dynamic()
in a LazyFrame which has previously been filtered. If I try to rungroupby_dynamic()
on that LF and it happens to be empty because of the filtering, callingcollect()
raises the following error:I have confirmed this does not happen with the normal
groupby()
method, it works as expected and returns an empty DataFrame when callingcollect()
.Also, I was able to work around this problem with this, but I'm not sure it's ideal:
Reproducible example
Expected behavior
When runnin
collect()
, we receive an empty DataFrame, asgroupby_dynamic()
didn't have any data to work with in the LF, just asgroupby()
would.Installed versions
The text was updated successfully, but these errors were encountered: