title: How to perform correlation between categorical columns
body: <p>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.</p>
  
  <p>How do I generate a correlation table that do pairwise correlation between df1 and df2?</p>
  
  <p>the table will look like</p>
  
  <pre><code>    col1 col2 col3
  col4 ..   ..   ..
  col5 ..   ..   ..
  col6 ..   ..   ..
  </code></pre>
  
  <p>I use <code>df1.corrwith(df2)</code>, it does not seem to generate the table as required.</p>
  
  <p>I have a asked a similar question here:
  <a href="https://stackoverflow.com/questions/41823728/how-to-perform-correlation-between-two-dataframes-with-different-column-names">How to perform Correlation between two dataframes with different column names</a>
  but now I am dealing with categorical columns.</p>
  
  <p>If it is not comparable directly, is there a standard way to make it comparable (like using get_dummies)? and is that a faster way to automatically process all fields (assume all are categorical) and calculate their correlation?</p>