We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7d90236 + af08c13 commit bd2248cCopy full SHA for bd2248c
pandas/io/tests/data/testskiprows.xls
22 KB
pandas/io/tests/data/testskiprows.xlsm
8.09 KB
pandas/io/tests/data/testskiprows.xlsx
8.06 KB
pandas/io/tests/test_excel.py
@@ -660,6 +660,21 @@ def test_read_excel_chunksize(self):
660
pd.read_excel(os.path.join(self.dirpath, 'test1' + self.ext),
661
chunksize=100)
662
663
+ def test_read_excel_skiprows_list(self):
664
+ #GH 4903
665
+ actual = pd.read_excel(os.path.join(self.dirpath, 'testskiprows' + self.ext),
666
+ 'skiprows_list', skiprows=[0,2])
667
+ expected = DataFrame([[1, 2.5, pd.Timestamp('2015-01-01'), True],
668
+ [2, 3.5, pd.Timestamp('2015-01-02'), False],
669
+ [3, 4.5, pd.Timestamp('2015-01-03'), False],
670
+ [4, 5.5, pd.Timestamp('2015-01-04'), True]],
671
+ columns = ['a','b','c','d'])
672
+ tm.assert_frame_equal(actual, expected)
673
+
674
675
+ 'skiprows_list', skiprows=np.array([0,2]))
676
677
678
class XlsReaderTests(XlrdTests, tm.TestCase):
679
ext = '.xls'
680
engine_name = 'xlrd'
0 commit comments