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): Consistent behaviour when "infer_schema_length=0" for read_excel #16840

Merged

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Jun 9, 2024

Closes #16408.

  • Ensures consistent behaviour between all supported engines when infer_schema_length == 0.; we expect no inference in this case, meaning all columns should be loaded as strings.
  • Validated for "xlsx2csv", "openpyxl", and "calamine".
  • Also covers read_ods.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jun 9, 2024
@alexander-beedie alexander-beedie added the A-io-excel Area: reading/writing Excel files label Jun 9, 2024
Copy link

codecov bot commented Jun 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.38%. Comparing base (c81ef69) to head (0926d99).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16840   +/-   ##
=======================================
  Coverage   81.38%   81.38%           
=======================================
  Files        1425     1425           
  Lines      187606   187684   +78     
  Branches     2697     2698    +1     
=======================================
+ Hits       152677   152741   +64     
- Misses      34434    34448   +14     
  Partials      495      495           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexander-beedie alexander-beedie changed the title fix: Consistent behaviour when "infer_schema_length=0" for read_excel fix(python): Consistent behaviour when "infer_schema_length=0" for read_excel Jun 10, 2024
@alexander-beedie alexander-beedie removed the rust Related to Rust Polars label Jun 10, 2024
@ritchie46 ritchie46 merged commit 4a45a9d into pola-rs:main Jun 10, 2024
17 checks passed
@alexander-beedie alexander-beedie deleted the read-excel-infer-schema-len branch June 10, 2024 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io-excel Area: reading/writing Excel files fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read_excel with engine="calamine" infer_schema_length=0 returns an empty DataFrame
2 participants