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

list.to_struct().struct.unnest() fails #19812

Closed
2 tasks done
mcrumiller opened this issue Nov 15, 2024 · 0 comments · Fixed by #19830
Closed
2 tasks done

list.to_struct().struct.unnest() fails #19812

mcrumiller opened this issue Nov 15, 2024 · 0 comments · Fixed by #19830
Assignees
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars

Comments

@mcrumiller
Copy link
Contributor

mcrumiller commented Nov 15, 2024

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

When a list is converted to a struct, unnest() cannot be called immediately afterwards.

import polars as pl

df = pl.DataFrame({"a": [[1, 2, 3]]})
df.select(pl.col("a").list.to_struct().struct.unnest())
# polars.exceptions.InvalidOperationError: expected 'struct'

Installed versions

main

@mcrumiller mcrumiller added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Nov 15, 2024
@c-peters c-peters added the accepted Ready for implementation label Nov 18, 2024
@c-peters c-peters added this to Backlog Nov 18, 2024
@c-peters c-peters moved this to Done in Backlog Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants