@@ -89,7 +89,7 @@ def test_constructor_from_2d_datetimearray(self):
89
89
90
90
df = DataFrame (dta )
91
91
expected = DataFrame ({0 : dta [:, 0 ], 1 : dta [:, 1 ]})
92
- tm .assert_frame_equal (df , expected , check_column_type = False )
92
+ tm .assert_frame_equal (df , expected )
93
93
# GH#44724 big performance hit if we de-consolidate
94
94
assert len (df ._mgr .blocks ) == 1
95
95
@@ -950,15 +950,15 @@ def test_nested_dict_frame_constructor(self):
950
950
data .setdefault (col , {})[row ] = df ._get_value (row , col )
951
951
952
952
result = DataFrame (data , columns = rng )
953
- tm .assert_frame_equal (result , df , check_index_type = False )
953
+ tm .assert_frame_equal (result , df )
954
954
955
955
data = {}
956
956
for col in df .columns :
957
957
for row in df .index :
958
958
data .setdefault (row , {})[col ] = df ._get_value (row , col )
959
959
960
960
result = DataFrame (data , index = rng ).T
961
- tm .assert_frame_equal (result , df , check_index_type = False )
961
+ tm .assert_frame_equal (result , df )
962
962
963
963
def _check_basic_constructor (self , empty ):
964
964
# mat: 2d matrix with shape (3, 2) to input. empty - makes sized
@@ -1266,10 +1266,10 @@ def test_constructor_list_of_lists(self, using_infer_string):
1266
1266
1267
1267
# GH 4851
1268
1268
# list of 0-dim ndarrays
1269
- expected = DataFrame ({ 0 : np .arange (10 )} )
1269
+ expected = DataFrame (np .arange (10 ))
1270
1270
data = [np .array (x ) for x in range (10 )]
1271
1271
result = DataFrame (data )
1272
- tm .assert_frame_equal (result , expected , check_column_type = False )
1272
+ tm .assert_frame_equal (result , expected )
1273
1273
1274
1274
def test_nested_pandasarray_matches_nested_ndarray (self ):
1275
1275
# GH#43986
@@ -1403,9 +1403,7 @@ def test_constructor_generator(self):
1403
1403
gen = ([i , "a" ] for i in range (10 ))
1404
1404
result = DataFrame (gen )
1405
1405
expected = DataFrame ({0 : range (10 ), 1 : "a" })
1406
- tm .assert_frame_equal (
1407
- result , expected , check_dtype = False , check_column_type = False
1408
- )
1406
+ tm .assert_frame_equal (result , expected , check_dtype = False )
1409
1407
1410
1408
def test_constructor_list_of_dicts (self ):
1411
1409
result = DataFrame ([{}])
@@ -1651,8 +1649,8 @@ def test_constructor_Series_named(self):
1651
1649
1652
1650
# this is a bit non-intuitive here; the series collapse down to arrays
1653
1651
df = DataFrame ([arr , s1 ]).T
1654
- expected = DataFrame ({1 : s1 , 0 : arr }, columns = [ 0 , 1 ] )
1655
- tm .assert_frame_equal (df , expected , check_column_type = False )
1652
+ expected = DataFrame ({1 : s1 , 0 : arr }, columns = range ( 2 ) )
1653
+ tm .assert_frame_equal (df , expected )
1656
1654
1657
1655
def test_constructor_Series_named_and_columns (self ):
1658
1656
# GH 9232 validation
@@ -2187,7 +2185,7 @@ def test_constructor_ndarray_categorical_dtype(self):
2187
2185
result = DataFrame (arr , dtype = cat .dtype )
2188
2186
2189
2187
expected = DataFrame ({0 : cat , 1 : cat , 2 : cat , 3 : cat })
2190
- tm .assert_frame_equal (result , expected , check_column_type = False )
2188
+ tm .assert_frame_equal (result , expected )
2191
2189
2192
2190
def test_constructor_categorical (self ):
2193
2191
# GH8626
@@ -2583,7 +2581,7 @@ def test_from_2d_object_array_of_periods_or_intervals(self):
2583
2581
data3 = np .r_ [data , data2 , data , data2 ].T
2584
2582
df3 = DataFrame (data3 )
2585
2583
expected = DataFrame ({0 : pi , 1 : ii , 2 : pi , 3 : ii })
2586
- tm .assert_frame_equal (df3 , expected , check_column_type = False )
2584
+ tm .assert_frame_equal (df3 , expected )
2587
2585
2588
2586
@pytest .mark .parametrize (
2589
2587
"col_a, col_b" ,
@@ -2676,7 +2674,7 @@ def test_frame_string_inference_array_string_dtype(self):
2676
2674
expected = DataFrame ({0 : ["a" , "b" ], 1 : ["c" , "d" ]}, dtype = dtype )
2677
2675
with pd .option_context ("future.infer_string" , True ):
2678
2676
df = DataFrame (np .array ([["a" , "c" ], ["b" , "d" ]]))
2679
- tm .assert_frame_equal (df , expected , check_column_type = False )
2677
+ tm .assert_frame_equal (df , expected )
2680
2678
2681
2679
expected = DataFrame (
2682
2680
{"a" : ["a" , "b" ], "b" : ["c" , "d" ]},
0 commit comments