title: How i can covert string or object column itens to binary with pandas
body: <p>I am trying to convert a column to a dataser in which there are 'negative' and 'positive' for binaries or numberable items like 0 and 1, but I don't know if I'm doing it right with the Pandas library.</p>
  <pre><code>pd.cut(data.Class, bins=['negative','positive'],labels=['0','1'])
  </code></pre>
  <p>but the following error appears:</p>
  <pre><code>ValueError: could not convert string to float: 'negative' 
  </code></pre>
  <p>A dataset sample:</p>
  <pre><code>          v8      v9      Class  
  0    0.00000  0.1224   negative  
  1    0.00000  0.0000   negative  
  2    0.00000  0.0000   negative  
  3    0.00000  0.0000   negative  
  4    0.00000  0.0561   negative  
  ..       ...     ...        ...  
  166  0.66150  0.0000   negative  
  167  1.06155  0.0000   negative  
  168  1.62855  0.0000   negative  
  169  1.71045  0.0000   positive  
  170  1.54980  0.0000   positive
  </code></pre>
  <p>I would like the result to be as follows:</p>
  <pre><code>          v8      v9   Class  
  0    0.00000  0.1224   0  
  1    0.00000  0.0000   0  
  2    0.00000  0.0000   0  
  3    0.00000  0.0000   0  
  4    0.00000  0.0561   0  
  ..       ...     ...    ...  
  166  0.66150  0.0000   0  
  167  1.06155  0.0000   0  
  168  1.62855  0.0000   0  
  169  1.71045  0.0000   1  
  170  1.54980  0.0000   1  
  </code></pre>