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

feat(python): allow Series init with Unknown dtype to proceed as if dtype is None, to allow inference #7830

Merged

Conversation

alexander-beedie
Copy link
Collaborator

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

The Unknown dtype isn't invalid, it's just... "unknown". So, this PR allows for inference if a Series is declared as having Unknown dtype at init time; this is equivalent to dtype=None, and is also consistent with the the way that PyDataFrame read_rows and read_dicts schema overrides behave.

Also:

  • Added missing imports that were declared in polars.datatypes.__init__.__all__, but that weren't actually being imported at that level.

  • Reinstated venv into gitignore for the time-being; otherwise ~18,000 files show up as unversioned and typos goes bananas on pre-commit (spraying megabytes of text into your terminal) if you haven't both created the new/preferred .venv and deleted the old venv. Will smooth things over until everyone has transitioned.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Mar 28, 2023
@ritchie46 ritchie46 merged commit 61474b5 into pola-rs:master Mar 28, 2023
@alexander-beedie alexander-beedie deleted the init-unknown-dtype-as-none branch March 28, 2023 10:16
LdRoW pushed a commit to LdRoW/polars that referenced this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants