pandas merge multiple data tables

If I have multiple excel tables, the column names of each table are in one-to-one correspondence but in different order, how to merge them, the merge() function of pandas can do it

merge() function format

pd.merge(left, right, how='inner', on=None, left_on=None, right_on=None,left_index=False, right_index=False, sort=True,suffixes=('_x', '_y'), copy=True)

insert image description here
When I want to merge multiple tables, I can use the following program

pd.merge(filename1, filename2, how='left', on=None)

pd is the data, how='left' means to append up and down according to the column name of filename1 For
more information, please refer to

http://c.biancheng.net/pandas/merge.html

Guess you like

Origin blog.csdn.net/weixin_40061485/article/details/123323399