title: Finding correlation between numeric encoded categorical variables?
body: <p>So I have a data set which has categorical variables. I have encoded each category from 0:x depending on the amount of categories x. I am trying to find the correlation between the variables (both numeric and categorical) to the target variable (which is also categorical, but has been coded to 0 for no and 1 for yes). </p>
  
  <p>I have been able to run this code for the correlation(s) for all the variables (there are about 17) and it does seem to work, but I question whether the correlations are correct. I haven't calculated the correlation with categorical variables in my data set before, just want to ensure that I am going about this the right way:</p>
  
  <pre><code>print(df['previous'].corr(df['y']))
  </code></pre>
  
  <p>Any help would be great! </p>