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

Adds logic to automatically trim empty columns #912

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chaburkland
Copy link
Collaborator

Hi @flexatone - this is a quick sketch to address an issue with xlsx Frame parsing. I don't have an up-to-date SF dev environment, so this is more meant as a proof of concept.

Basically, XLSX worksheets can easily report max_columns as being many more than expected. For example, you might have a worksheet with 3 columns, but ws.max_columns reports 1025, due to formatting. I know there is a nadir option, but it seems strange to support attempting to build impossible frames.

If 1022 columns are simply EmptyCells, then the frame can never construct due to the repeated None's. My thought is to look at the header column, and automatically ignore all trailing EmptyCells.

(I just realized my sketch doesn't account for index hierarchies, but oh well 🙃)

What are your thoughts?

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (17ffbe4) to head (98202f6).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #912   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           63        63           
  Lines        21877     21885    +8     
=========================================
+ Hits         21877     21885    +8     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant