I have a set of columns (col1,col2,col3) in dataframe df1 I have another set of columns (col4,col5,col6) in dataframe df2 Assume this two dataframes has the same number of rows.
How do I generate a correlation table that do pairwise correlation between df1 and df2?
the table will look like
col1 col2 col3
col4 .. .. ..
col5 .. .. ..
col6 .. .. ..
I use df1.corrwith(df2)
, it does not seem to generate the table as required.
I have seen the answer at How to check correlation between matching columns of two data sets?, but the main difference is that the col names does not matched.