Skip to content

DOC: #25723 passing kwargs to excel document engine #26465

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

Merged
merged 4 commits into from
May 20, 2019
Merged

DOC: #25723 passing kwargs to excel document engine #26465

merged 4 commits into from
May 20, 2019

Conversation

Dunni3
Copy link
Contributor

@Dunni3 Dunni3 commented May 20, 2019

This pr tries to address #25723.

Made a small addition to the ExcelFile section of user_guide/io.rst regarding the discussion in #25723.

@codecov
Copy link

codecov bot commented May 20, 2019

Codecov Report

Merging #26465 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26465      +/-   ##
==========================================
- Coverage   91.74%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50763    50763              
==========================================
- Hits        46575    46572       -3     
- Misses       4188     4191       +3
Flag Coverage Δ
#multiple 90.25% <ø> (ø) ⬆️
#single 41.69% <ø> (-0.1%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/frame.py 97.02% <0%> (-0.12%) ⬇️
pandas/util/testing.py 90.7% <0%> (+0.1%) ⬆️

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 44d5498...064aec2. Read the comment docs.

@codecov
Copy link

codecov bot commented May 20, 2019

Codecov Report

Merging #26465 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26465      +/-   ##
==========================================
- Coverage   91.74%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50763    50765       +2     
==========================================
- Hits        46575    46574       -1     
- Misses       4188     4191       +3
Flag Coverage Δ
#multiple 90.25% <ø> (ø) ⬆️
#single 41.72% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/frame.py 97.02% <0%> (-0.12%) ⬇️
pandas/core/tools/numeric.py 100% <0%> (ø) ⬆️
pandas/util/testing.py 90.7% <0%> (+0.1%) ⬆️

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 44d5498...fd3f0c2. Read the comment docs.

@@ -2864,6 +2864,16 @@ of sheet names can simply be passed to ``read_excel`` with no loss in performanc
data = pd.read_excel('path_to_file.xls', ['Sheet1', 'Sheet2'],
index_col=None, na_values=['NA'])

If control is needed over how a file is read, an ``xlrd`` workbook
created with the desired keyword arguments can be passed to ``ExcelFile``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be it's just me, but I don't find this sentence very easy to read.

I'd rephrase to something like: "pandas.ExcelFile can also be called with an xlrd.open_workbook as a parameter. This lets the user have control on how the workbook is opened, for example with on_demand=True". Or something similar.

CC: @WillAyd @TomAugspurger

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datapythonista's sounds good, though I might change "an xldd.open_workbook" to whatever type of object that returns.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I just committed the suggested changes.

@datapythonista datapythonista added Docs IO Excel read_excel, to_excel labels May 20, 2019
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@WillAyd WillAyd added this to the 0.25.0 milestone May 20, 2019
@WillAyd WillAyd merged commit f5cc078 into pandas-dev:master May 20, 2019
@WillAyd
Copy link
Member

WillAyd commented May 20, 2019

Very nice - thanks @Dunni3 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Excel Document Passing Kwargs to Engine
4 participants