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): Add "drop_empty_cols" parameter for read_excel and read_ods #20430

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Dec 23, 2024

Closes #20376.

Complements the existing "drop_empty_rows" parameter. Note that the default engine calamine does not currently have an option we can use for this, but it looks like one is planned; once available we can hook in to it. In the meantime this parameter has been validated for use with the slower openpyxl and xlsx2csv engines.

Also:

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Dec 23, 2024
@alexander-beedie alexander-beedie added the A-io-spreadsheet Area: reading/writing Excel/ODS files label Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.01%. Comparing base (f213c36) to head (67343f5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
py-polars/polars/io/spreadsheet/functions.py 84.21% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20430      +/-   ##
==========================================
- Coverage   79.02%   79.01%   -0.01%     
==========================================
  Files        1562     1562              
  Lines      220163   220177      +14     
  Branches     2486     2488       +2     
==========================================
+ Hits       173973   173981       +8     
- Misses      45617    45623       +6     
  Partials      573      573              

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

@ritchie46 ritchie46 merged commit ae7e42d into pola-rs:main Dec 24, 2024
20 checks passed
@alexander-beedie alexander-beedie deleted the drop-empty-cols branch December 24, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io-spreadsheet Area: reading/writing Excel/ODS files 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.

Polars dropping empty columns in read_xlsx
2 participants