@@ -346,7 +346,7 @@ def test_concatlike_datetimetz_short(self, tz):
346
346
'2014-07-21' ], tz = tz )
347
347
exp = pd .DataFrame (0 , index = exp_idx , columns = ['A' , 'B' ])
348
348
349
- tm .assert_frame_equal (df1 .append (df2 ), exp )
349
+ tm .assert_frame_equal (df1 .append (df2 , sort = False ), exp )
350
350
tm .assert_frame_equal (pd .concat ([df1 , df2 ]), exp )
351
351
352
352
def test_concatlike_datetimetz_to_object (self , tz_aware_fixture ):
@@ -1029,7 +1029,7 @@ def test_crossed_dtypes_weird_corner(self):
1029
1029
'D' : np .array ([1 , 2 , 3 , 4 ], dtype = 'f8' )},
1030
1030
columns = columns )
1031
1031
1032
- appended = df1 .append (df2 , ignore_index = True )
1032
+ appended = df1 .append (df2 , ignore_index = True , sort = False )
1033
1033
expected = DataFrame (np .concatenate ([df1 .values , df2 .values ], axis = 0 ),
1034
1034
columns = columns )
1035
1035
tm .assert_frame_equal (appended , expected )
@@ -1072,14 +1072,14 @@ def test_dups_index(self):
1072
1072
assert_frame_equal (result .iloc [10 :], df )
1073
1073
1074
1074
# append
1075
- result = df .iloc [0 :8 , :].append (df .iloc [8 :])
1075
+ result = df .iloc [0 :8 , :].append (df .iloc [8 :], sort = False )
1076
1076
assert_frame_equal (result , df )
1077
1077
1078
- result = df .iloc [0 :8 , :].append (df .iloc [8 :9 ]).append (df .iloc [9 :10 ])
1078
+ result = df .iloc [0 :8 , :].append (df .iloc [8 :9 ]).append (df .iloc [9 :10 ], sort = False )
1079
1079
assert_frame_equal (result , df )
1080
1080
1081
1081
expected = concat ([df , df ], axis = 0 )
1082
- result = df .append (df )
1082
+ result = df .append (df , sort = False )
1083
1083
assert_frame_equal (result , expected )
1084
1084
1085
1085
def test_with_mixed_tuples (self , sort ):
@@ -1866,7 +1866,7 @@ def test_categorical_concat_append(self):
1866
1866
index = Index ([0 , 1 , 0 , 1 ]))
1867
1867
1868
1868
tm .assert_frame_equal (pd .concat ([df , df ]), exp )
1869
- tm .assert_frame_equal (df .append (df ), exp )
1869
+ tm .assert_frame_equal (df .append (df , sort = False ), exp )
1870
1870
1871
1871
# GH 13524 can concat different categories
1872
1872
cat3 = Categorical (["a" , "b" ], categories = ["a" , "b" , "c" ])
@@ -1877,7 +1877,7 @@ def test_categorical_concat_append(self):
1877
1877
exp = DataFrame ({"cats" : list ('abab' ), "vals" : [1 , 2 , 1 , 2 ]})
1878
1878
tm .assert_frame_equal (res , exp )
1879
1879
1880
- res = df .append (df_different_categories , ignore_index = True )
1880
+ res = df .append (df_different_categories , ignore_index = True , sort = False )
1881
1881
tm .assert_frame_equal (res , exp )
1882
1882
1883
1883
def test_categorical_concat_dtypes (self ):
@@ -1939,7 +1939,7 @@ def test_categorical_concat_gh7864(self):
1939
1939
tm .assert_index_equal (df ['grade' ].cat .categories ,
1940
1940
dfx ['grade' ].cat .categories )
1941
1941
1942
- dfa = df1 .append (df2 )
1942
+ dfa = df1 .append (df2 , sort = False )
1943
1943
tm .assert_index_equal (df ['grade' ].cat .categories ,
1944
1944
dfa ['grade' ].cat .categories )
1945
1945
0 commit comments