title: Pandas - create boolean columns from categorical column
body: <p>I have column Place in Pandas dataframe which looks like this:</p>
  
  <pre><code>**Place**
  Berlin
  Prague
  Mexico
  Prague
  Mexico
  ...
  </code></pre>
  
  <p>I'd like to do the following:</p>
  
  <pre><code>is_Berlin   is_Prague   is_Mexico
  1           0           0
  0           1           0
  0           0           1
  0           1           0
  0           0           1   
  </code></pre>
  
  <p>I know I can create the columns separately:</p>
  
  <pre><code>df['is_Berlin'] = df['Place']
  df['is_Prague'] = df['Place']
  df['is_Mexico'] = df['Place']
  </code></pre>
  
  <p>And then create a dictionary for each column and apply a map function.</p>
  
  <pre><code>#Example just for is_Berlin column
  d = {'Berlin': 1,'Prague': 0,'Mexico': 0} 
  df['is_Berlin'] = df['is_Berlin'].map(d)
  </code></pre>
  
  <p>But I find this somehow tedious and I believe there is nice pythonic way how do to it.</p>