Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

jeffcarey
Copy link
Contributor

@jreback jreback added Clean IO Excel read_excel, to_excel labels Mar 6, 2017
@@ -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 (
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor

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-io
Copy link

codecov-io commented Mar 6, 2017

Codecov Report

Merging #15592 into master will decrease coverage by -0.03%.
The diff coverage is 88.88%.

@@            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
Impacted Files Coverage Δ
pandas/core/frame.py 97.87% <ø> (-0.06%)
pandas/io/excel.py 79.67% <88.88%> (+0.03%)
pandas/io/gbq.py 25% <0%> (-58.34%)
pandas/tools/merge.py 91.78% <0%> (-0.35%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bf4532...81cb86f. Read the comment docs.

@jreback jreback added this to the 0.20.0 milestone Mar 7, 2017
@jreback
Copy link
Contributor

jreback commented Mar 7, 2017

thanks @jeffcarey

@jreback jreback closed this in 1123982 Mar 7, 2017
AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this pull request Mar 21, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants