title: Creating dummy variables in pandas for python
body: <p>I'm trying to create a series of dummy variables from a categorical variable using pandas in python. I've come across the <code>get_dummies</code> function, but whenever I try to call it I receive an error that the name is not defined. </p>
  
  <p>Any thoughts or other ways to create the dummy variables would be appreciated.</p>
  
  <p><strong>EDIT</strong>: Since others seem to be coming across this, the <code>get_dummies</code> function in pandas now works perfectly fine. This means the following should work:</p>
  
  <pre><code>import pandas as pd
  
  dummies = pd.get_dummies(df['Category'])
  </code></pre>
  
  <p>See <a href="http://blog.yhathq.com/posts/logistic-regression-and-python.html" rel="noreferrer">http://blog.yhathq.com/posts/logistic-regression-and-python.html</a> for further information.</p>