title: Pandas: get_dummies vs categorical
body: <p>I have a dataset which has  a few columns with categorical data. </p>
  
  <p>I've been using the Categorical function to replace categorical values with numerical ones. </p>
  
  <pre><code>data[column] = pd.Categorical.from_array(data[column]).codes
  </code></pre>
  
  <p>I've recently ran across the pandas.get_dummies function. Are these interchangeable? Is there an advantage of using one over the other?</p>