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

Cant slice or split or print Table from specific csv data #776

Open
timwirt opened this issue May 17, 2024 · 1 comment
Open

Cant slice or split or print Table from specific csv data #776

timwirt opened this issue May 17, 2024 · 1 comment
Milestone

Comments

@timwirt
Copy link
Contributor

timwirt commented May 17, 2024

Describe the bug

After creating a Table using data = Table.from_csv_file("cldata.csv") it seems that some functions dont work with it.
cldata.csv

We get this error:

  • specifying correct dtype with the dtypes argument
  • setting ignore_errors to True,
  • adding 60.667 to the null_values list.

Original error: remaining bytes non-empty

To Reproduce

  1. Import cldata.csv with data = Table.from_csv_file("cldata.csv")
  2. For example: data.slice_rows(length=10) or data.summarize_statistics()

Expected behavior

The functions should work :)

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann
Copy link
Member

lars-reimann commented May 17, 2024

Related to

polars uses the first 100 rows to determine the schema of a table by default. Because of this, it infers the type of the age column as some variant of Int. However, in row 186 (header skipped), the float 60.667 appears in the age column, which causes this error.

@lars-reimann lars-reimann added this to the v1.0.0 milestone Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants