-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
doc/source/user_guide/io.rst
Outdated
@@ -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``. |
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.
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.
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.
@datapythonista's sounds good, though I might change "an xldd.open_workbook" to whatever type of object that returns.
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.
I agree. I just committed the suggested changes.
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.
lgtm
Very nice - thanks @Dunni3 ! |
git diff upstream/master -u -- "*.py" | flake8 --diff
This pr tries to address #25723.
Made a small addition to the ExcelFile section of user_guide/io.rst regarding the discussion in #25723.