I am concenating five dataframes to a single dataframe and then saving that dataframe as an xlsx file. However, the individual dataframes do not align properly. Lets assume that the first dataframe ends at row 700 and the second one begins at 701. This is what it looks like in the xlsx file(placeholder column elements):
Index Name Code Email Name(duplicate)
699 Austin abc mail1
700 Kate def mail2
701 hjk mail3 Stacy
As you can see, when moves on to the data from the second dataframe, the columns shift. Individual dataframes have the same column titles and the same number of columns in the same order. But when they are concanated vertically, all columns starting from the second dataframe shift one column, with the names now being at the last duplicate column, instead of in their proper place. This only happens when going from first dataframe to the second. When going from second to third for example, it continues to use the fake name column instead of the real one. The code I used is given below.
toplam=pd.concat([anapa_1,anapa_2,anapa_3,anapa_5,anapa_6],verify_integrity=True,ignore_index=True)
The anapas are the original dataframes. They are completely normal when saved seperately, they only behave this way when they are put together. It is very important that all elements stay in their respective columns at all times. Any help would be appreciated.