-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Moved freeze_panes validation to io/excel.py (#15160) #15592
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
Conversation
pandas/io/excel.py
Outdated
@@ -1331,8 +1331,15 @@ def write_cells(self, cells, sheet_name=None, startrow=0, startcol=0, | |||
self.sheets[sheet_name] = wks | |||
|
|||
if freeze_panes is not None: | |||
wks.freeze_panes = wks.cell(row=freeze_panes[0] + 1, | |||
column=freeze_panes[1] + 1) | |||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what I meant originally, is you can add a _validate_freeze_panes
method HERE (to avoid duplicating this code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any preference on whether _validate_freeze_panes is a method of the ExcelFile class or just a loose function in excel.py? Looking at other _validate functions in the code base it seems it can go either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffcarey no preference. would be nice to have them be the same (could be a PR if you want). or even could do here. if you want.
Codecov Report
@@ Coverage Diff @@
## master #15592 +/- ##
==========================================
- Coverage 91.06% 91.03% -0.03%
==========================================
Files 137 137
Lines 49307 49307
==========================================
- Hits 44900 44889 -11
- Misses 4407 4418 +11
Continue to review full report at Codecov.
|
thanks @jeffcarey |
follow up to pandas-dev#15160 Author: Jeff Carey <[email protected]> Closes pandas-dev#15592 from jeffcarey/enh-15160-touchup2 and squashes the following commits: 81cb86f [Jeff Carey] Cleaned up freeze_panes validation code a802fc7 [Jeff Carey] Moved freeze_panes validation to io/excel.py
git diff upstream/master | flake8 --diff