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): Fix bool/string usage of "column_totals" parameter in write_excel #17846

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Jul 24, 2024

Somewhere along the line the "column_totals" parameter of write_excel stopped working for boolean and string 'func_name' variations (dict/list input was still fine, which is likely why this wasn't noticed earlier), eg:

  • column_totals=True
  • column_totals="average"

This PR fixes both of these uses, and updates "column_totals" typing (to properly indicate that it supports selectors).

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Jul 24, 2024
@alexander-beedie alexander-beedie added the A-io-excel Area: reading/writing Excel files label Jul 24, 2024
@alexander-beedie alexander-beedie changed the title fix(python): Fix use of "column_totals" parameter in write_excel fix(python): Fix bool/string usage of "column_totals" parameter in write_excel Jul 24, 2024
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.50%. Comparing base (e96dd26) to head (3eb13f7).
Report is 2 commits behind head on main.

Files Patch % Lines
py-polars/polars/io/spreadsheet/_write_utils.py 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17846      +/-   ##
==========================================
+ Coverage   80.49%   80.50%   +0.01%     
==========================================
  Files        1504     1504              
  Lines      197156   197161       +5     
  Branches     2806     2805       -1     
==========================================
+ Hits       158704   158732      +28     
+ Misses      37931    37909      -22     
+ Partials      521      520       -1     

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

@ritchie46 ritchie46 merged commit 0cf2c07 into pola-rs:main Jul 25, 2024
19 checks passed
@alexander-beedie alexander-beedie deleted the fix-excel-column-totals branch July 25, 2024 08:21
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.

2 participants