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): fix for categorical inserts from row-oriented data #5462

Merged
merged 1 commit into from
Nov 10, 2022
Merged

fix(python): fix for categorical inserts from row-oriented data #5462

merged 1 commit into from
Nov 10, 2022

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Nov 10, 2022

Closes #5457.


Delay application of Categorical type until after initial load when initialising DataFrame from row-oriented data. Fixes thread '<unnamed>' panicked at 'Categorical(None).

Update: also spotted that the same issue would occur on insert from @dataclass and/or NamedTuple data (which is also naturally row-oriented) and fixed that too.

Test coverage added for all of the above.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Nov 10, 2022
@ritchie46 ritchie46 merged commit 9f5049f into pola-rs:master Nov 10, 2022
@alexander-beedie alexander-beedie deleted the categorical-init-from-rows branch November 11, 2022 09:24
zundertj pushed a commit to zundertj/polars that referenced this pull request Jan 7, 2023
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.

Setting column-type to category crashes when instantiating dataframe
2 participants