@@ -9523,7 +9523,6 @@ def _append(
9523
9523
verify_integrity : bool = False ,
9524
9524
sort : bool = False ,
9525
9525
) -> DataFrame :
9526
- combined_columns = None
9527
9526
if isinstance (other , (Series , dict )):
9528
9527
if isinstance (other , dict ):
9529
9528
if not ignore_index :
@@ -9536,8 +9535,6 @@ def _append(
9536
9535
)
9537
9536
9538
9537
index = Index ([other .name ], name = self .index .name )
9539
- idx_diff = other .index .difference (self .columns )
9540
- combined_columns = self .columns .append (idx_diff )
9541
9538
row_df = other .to_frame ().T
9542
9539
# infer_objects is needed for
9543
9540
# test_append_empty_frame_to_series_with_dateutil_tz
@@ -9563,16 +9560,6 @@ def _append(
9563
9560
verify_integrity = verify_integrity ,
9564
9561
sort = sort ,
9565
9562
)
9566
- if (
9567
- combined_columns is not None
9568
- and not sort
9569
- and not combined_columns .equals (result .columns )
9570
- ):
9571
- # TODO: reindexing here is a kludge bc union_indexes does not
9572
- # pass sort to index.union, xref #43375
9573
- # combined_columns.equals check is necessary for preserving dtype
9574
- # in test_crosstab_normalize
9575
- result = result .reindex (combined_columns , axis = 1 )
9576
9563
return result .__finalize__ (self , method = "append" )
9577
9564
9578
9565
def join (
0 commit comments