@@ -147,17 +147,9 @@ def test_usecols_int(self, ext):
147
147
df2 = self .get_exceldf ("test1" , ext , "Sheet2" , skiprows = [1 ],
148
148
index_col = 0 , usecols = 3 )
149
149
150
- # parse_cols instead of usecols, usecols as int
151
- with tm .assert_produces_warning (FutureWarning ,
152
- check_stacklevel = False ):
153
- with ignore_xlrd_time_clock_warning ():
154
- df3 = self .get_exceldf ("test1" , ext , "Sheet2" , skiprows = [1 ],
155
- index_col = 0 , parse_cols = 3 )
156
-
157
150
# TODO add index to xls file)
158
151
tm .assert_frame_equal (df1 , df_ref , check_names = False )
159
152
tm .assert_frame_equal (df2 , df_ref , check_names = False )
160
- tm .assert_frame_equal (df3 , df_ref , check_names = False )
161
153
162
154
@td .skip_if_no ('xlrd' , '1.0.1' ) # GH-22682
163
155
def test_usecols_list (self , ext ):
@@ -169,15 +161,9 @@ def test_usecols_list(self, ext):
169
161
df2 = self .get_exceldf ('test1' , ext , 'Sheet2' , skiprows = [1 ],
170
162
index_col = 0 , usecols = [0 , 2 , 3 ])
171
163
172
- with tm .assert_produces_warning (FutureWarning ):
173
- with ignore_xlrd_time_clock_warning ():
174
- df3 = self .get_exceldf ('test1' , ext , 'Sheet2' , skiprows = [1 ],
175
- index_col = 0 , parse_cols = [0 , 2 , 3 ])
176
-
177
164
# TODO add index to xls file)
178
165
tm .assert_frame_equal (df1 , dfref , check_names = False )
179
166
tm .assert_frame_equal (df2 , dfref , check_names = False )
180
- tm .assert_frame_equal (df3 , dfref , check_names = False )
181
167
182
168
@td .skip_if_no ('xlrd' , '1.0.1' ) # GH-22682
183
169
def test_usecols_str (self , ext ):
@@ -190,15 +176,9 @@ def test_usecols_str(self, ext):
190
176
df3 = self .get_exceldf ('test1' , ext , 'Sheet2' , skiprows = [1 ],
191
177
index_col = 0 , usecols = 'A:D' )
192
178
193
- with tm .assert_produces_warning (FutureWarning ):
194
- with ignore_xlrd_time_clock_warning ():
195
- df4 = self .get_exceldf ('test1' , ext , 'Sheet2' , skiprows = [1 ],
196
- index_col = 0 , parse_cols = 'A:D' )
197
-
198
179
# TODO add index to xls, read xls ignores index name ?
199
180
tm .assert_frame_equal (df2 , df1 , check_names = False )
200
181
tm .assert_frame_equal (df3 , df1 , check_names = False )
201
- tm .assert_frame_equal (df4 , df1 , check_names = False )
202
182
203
183
df1 = dfref .reindex (columns = ['B' , 'C' ])
204
184
df2 = self .get_exceldf ('test1' , ext , 'Sheet1' , index_col = 0 ,
@@ -342,7 +322,7 @@ def test_excel_passes_na(self, ext):
342
322
tm .assert_frame_equal (parsed , expected )
343
323
344
324
@td .skip_if_no ('xlrd' , '1.0.1' ) # GH-22682
345
- @pytest .mark .parametrize ('arg' , ['sheet' , 'sheetname' ])
325
+ @pytest .mark .parametrize ('arg' , ['sheet' , 'sheetname' , 'parse_cols' ])
346
326
def test_unexpected_kwargs_raises (self , ext , arg ):
347
327
# gh-17964
348
328
excel = self .get_excelfile ('test1' , ext )
0 commit comments