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

No_null_schema inference option in pl.DataFrame #16153

Open
clayop opened this issue May 10, 2024 · 0 comments
Open

No_null_schema inference option in pl.DataFrame #16153

clayop opened this issue May 10, 2024 · 0 comments
Labels
enhancement New feature or an improvement of an existing feature

Comments

@clayop
Copy link

clayop commented May 10, 2024

Description

I am collecting some dirty data. While I convert json-ed data into pl.DataFrame, I met the following error.

could not append value: "21.04.22" of type: str to the builder; make sure that all rows have the same schema or consider increasing infer_schema_length

This is raised because the data I requested does not have any(null) in infer_schema_length rows, and Polars set this column as null, but 21.04.22 is shown after the rows. I resolved it by increase the length, but this consequently caused another inference error in another column.

The core problem is null type column. The safer way to deal with dirty data is to regard them as string. So if sort of no_null_schema exists, it would be really helpful to deal with dirty data.

@clayop clayop added the enhancement New feature or an improvement of an existing feature label May 10, 2024
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
Projects
None yet
Development

No branches or pull requests

1 participant