@@ -234,14 +234,14 @@ def test_excel_multindex_roundtrip(
234
234
check_names = bool (r_idx_names ) or r_idx_levels <= 1
235
235
236
236
if c_idx_levels == 1 :
237
- columns = Index (list ("abcde" ), dtype = object )
237
+ columns = Index (list ("abcde" ))
238
238
else :
239
239
columns = MultiIndex .from_arrays (
240
240
[range (5 ) for _ in range (c_idx_levels )],
241
241
names = [f"{ c_idx_names } -{ i } " for i in range (c_idx_levels )],
242
242
)
243
243
if r_idx_levels == 1 :
244
- index = Index (list ("ghijk" ), dtype = object )
244
+ index = Index (list ("ghijk" ))
245
245
else :
246
246
index = MultiIndex .from_arrays (
247
247
[range (5 ) for _ in range (r_idx_levels )],
@@ -475,7 +475,7 @@ def test_ts_frame(self, path):
475
475
unit = get_exp_unit (path )
476
476
df = DataFrame (
477
477
np .random .default_rng (2 ).standard_normal ((5 , 4 )),
478
- columns = Index (list ("ABCD" ), dtype = object ),
478
+ columns = Index (list ("ABCD" )),
479
479
index = date_range ("2000-01-01" , periods = 5 , freq = "B" ),
480
480
)
481
481
@@ -556,7 +556,7 @@ def test_sheets(self, frame, path):
556
556
unit = get_exp_unit (path )
557
557
tsframe = DataFrame (
558
558
np .random .default_rng (2 ).standard_normal ((5 , 4 )),
559
- columns = Index (list ("ABCD" ), dtype = object ),
559
+ columns = Index (list ("ABCD" )),
560
560
index = date_range ("2000-01-01" , periods = 5 , freq = "B" ),
561
561
)
562
562
index = pd .DatetimeIndex (np .asarray (tsframe .index ), freq = None )
@@ -684,7 +684,7 @@ def test_excel_roundtrip_datetime(self, merge_cells, path):
684
684
# freq does not round-trip
685
685
tsframe = DataFrame (
686
686
np .random .default_rng (2 ).standard_normal ((5 , 4 )),
687
- columns = Index (list ("ABCD" ), dtype = object ),
687
+ columns = Index (list ("ABCD" )),
688
688
index = date_range ("2000-01-01" , periods = 5 , freq = "B" ),
689
689
)
690
690
index = pd .DatetimeIndex (np .asarray (tsframe .index ), freq = None )
@@ -812,7 +812,7 @@ def test_to_excel_periodindex(self, path):
812
812
# xp has a PeriodIndex
813
813
df = DataFrame (
814
814
np .random .default_rng (2 ).standard_normal ((5 , 4 )),
815
- columns = Index (list ("ABCD" ), dtype = object ),
815
+ columns = Index (list ("ABCD" )),
816
816
index = date_range ("2000-01-01" , periods = 5 , freq = "B" ),
817
817
)
818
818
xp = df .resample ("ME" ).mean ().to_period ("M" )
@@ -882,7 +882,7 @@ def test_to_excel_multiindex_dates(self, merge_cells, path):
882
882
unit = get_exp_unit (path )
883
883
tsframe = DataFrame (
884
884
np .random .default_rng (2 ).standard_normal ((5 , 4 )),
885
- columns = Index (list ("ABCD" ), dtype = object ),
885
+ columns = Index (list ("ABCD" )),
886
886
index = date_range ("2000-01-01" , periods = 5 , freq = "B" ),
887
887
)
888
888
tsframe .index = MultiIndex .from_arrays (
@@ -1310,7 +1310,7 @@ def test_freeze_panes(self, path):
1310
1310
def test_path_path_lib (self , engine , ext ):
1311
1311
df = DataFrame (
1312
1312
1.1 * np .arange (120 ).reshape ((30 , 4 )),
1313
- columns = Index (list ("ABCD" ), dtype = object ),
1313
+ columns = Index (list ("ABCD" )),
1314
1314
index = Index ([f"i-{ i } " for i in range (30 )], dtype = object ),
1315
1315
)
1316
1316
writer = partial (df .to_excel , engine = engine )
@@ -1322,8 +1322,8 @@ def test_path_path_lib(self, engine, ext):
1322
1322
def test_path_local_path (self , engine , ext ):
1323
1323
df = DataFrame (
1324
1324
1.1 * np .arange (120 ).reshape ((30 , 4 )),
1325
- columns = Index (list ("ABCD" ), dtype = object ),
1326
- index = Index ([f"i-{ i } " for i in range (30 )], dtype = object ),
1325
+ columns = Index (list ("ABCD" )),
1326
+ index = Index ([f"i-{ i } " for i in range (30 )]),
1327
1327
)
1328
1328
writer = partial (df .to_excel , engine = engine )
1329
1329
0 commit comments