Pandas Merge Dataframes Sequentially on Conditions
I don't think that there is one line code to do this. So follow the steps.
1) First, create a list:
dfs = []
2) Merge for each condition on dataframe:
dfs.append(pd.merge(df1,df2,left_on='col1',right_on='col1',how='outer')).dropna()
dfs.append(pd.merge(df1,df2,left_on='col1',right_on='col2',how='outer')).dropna()
dfs.append(pd.merge(df1,df2,left_on='col1',right_on='col3',how='outer')).dropna()
^ repeat
3) Now concatenate them:
pd.concat(dfs)
Suppose I have 2 dataframe:
DF1:
Col1 | Col2 | Col3
XCN000370/17-18C | XCN0003711718C | 0003971718
DF2
Col1 | Col2 | Col3
XCN0003711718C | XCN0003711718C | 0003971718
I want them to merge like this:

First Match Col1 (DF1) and Col1 (DF2)
In Remaining Unmatched, Match Col1 (DF1) with Col2 (DF2)
In remaining Unmatched, Match Col1 (DF1) with Col3 (DF2)

Now repeat this by exchanging DF1 and DF2 with remaining unmatched

In Remaining Unmatched Match Col1 (DF2) and Col1 (DF1)
In Remaining Unmatched, Match Col1 (DF2) with Col2 (DF1)
In remaining Unmatched, Match Col1 (DF2) with Col3 (DF1)

Any ideas?