DOC: read_excel supports skiprows argument like read_csv, but tests and docs needed #36435
Labels
Docs
good first issue
IO Excel
read_excel, to_excel
Needs Tests
Unit test(s) needed to prevent regressions
Location of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html
https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
Documentation problem
In
read_csv
, we say that we support:skiprows list-like, int or callable, optional
Line numbers to skip (0-indexed) or number of lines to skip (int) at the start of the file.
If callable, the callable function will be evaluated against the row indices, returning True
if the row should be skipped and False otherwise. An example of a valid callable argument
would be lambda x: x in [0, 2].
In
read_excel
, we say that we support:skiprows list-like
Rows to skip at the beginning (0-indexed).
It turns out that the
int
andcallable
arguments work fine withread_excel()
, so we should indicate that in the documentation.We also need to add tests for those 2 cases.
Suggested fix for documentation and additional tests
read_csv
doc forskiprows
over toread_excel
tests/io/excel/test_readers.py
for theint
andcallable
optionsThe text was updated successfully, but these errors were encountered: