title: Pandas: TypeError: '>' not supported between instances of 'int' and 'str' when selecting on date column
body: <p>I have a Pandas DataFrame with a column with TimeStamps. I can select date ranges from this column. But after I make change to other columns in the DataFrame, I can no longer and I get the error "TypeError: '>' not supported between instances of 'int' and 'str'".</p>
  
  <p>The code below reproduce the problem: </p>
  
  <ul>
  <li>Generate a DataFrame with some random numbers</li>
  <li>Add a column with dates</li>
  <li><p>Select on the date column</p>
  
  <pre><code>df = pd.DataFrame(np.random.random((200,3)))
  df['date'] = pd.date_range('2000-1-1', periods=200, freq='D')
  mask = (df['date'] &gt; '2000-6-1') &amp; (df['date'] &lt;= '2000-6-10')
  print(df.loc[mask])
  </code></pre></li>
  </ul>
  
  <p>All good:</p>
  
  <pre><code>            0         1         2       date
  153  0.280575  0.810817  0.534509 2000-06-02
  154  0.490319  0.873906  0.465698 2000-06-03
  155  0.070790  0.898340  0.390777 2000-06-04
  156  0.896007  0.824134  0.134484 2000-06-05
  157  0.539633  0.814883  0.976257 2000-06-06
  158  0.772454  0.420732  0.499719 2000-06-07
  159  0.498020  0.495946  0.546043 2000-06-08
  160  0.562385  0.460190  0.480170 2000-06-09
  161  0.924412  0.611929  0.459360 2000-06-10
  </code></pre>
  
  <p><em>However</em>, now I set column 0 to 0 if it exceeds 0.7 and repeat:</p>
  
  <pre><code>df[df[0] &gt; 0.7] = 0
  mask = (df['date'] &gt; '2000-6-1') &amp; (df['date'] &lt;= '2000-6-10')
  </code></pre>
  
  <p>This gives the error:</p>
  
  <pre><code>TypeError: '&gt;' not supported between instances of 'int' and 'str'
  </code></pre>
  
  <p>Why does this happen and how do I avoid it?</p>