(self, request, engine, read_ext, df_ref)
| 263 | ) |
| 264 | |
| 265 | def test_usecols_list(self, request, engine, read_ext, df_ref): |
| 266 | xfail_datetimes_with_pyxlsb(engine, request) |
| 267 | |
| 268 | expected = df_ref[["B", "C"]] |
| 269 | adjust_expected(expected, read_ext, engine) |
| 270 | |
| 271 | df1 = pd.read_excel( |
| 272 | "test1" + read_ext, sheet_name="Sheet1", index_col=0, usecols=[0, 2, 3] |
| 273 | ) |
| 274 | df2 = pd.read_excel( |
| 275 | "test1" + read_ext, |
| 276 | sheet_name="Sheet2", |
| 277 | skiprows=[1], |
| 278 | index_col=0, |
| 279 | usecols=[0, 2, 3], |
| 280 | ) |
| 281 | |
| 282 | # TODO add index to xls file) |
| 283 | tm.assert_frame_equal(df1, expected) |
| 284 | tm.assert_frame_equal(df2, expected) |
| 285 | |
| 286 | def test_usecols_str(self, request, engine, read_ext, df_ref): |
| 287 | xfail_datetimes_with_pyxlsb(engine, request) |
nothing calls this directly
no test coverage detected