title: Python 3.6.5 returns '<' not supported between instances of 'tuple' and 'str' error message
body: <p>I'm trying to split a data set into a training and testing part. I am struggling at a structural problem as it seems as the hierarchy of the data seems to be wrong to proceed with below code.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>import pandas as pd
  data = pd.DataFrame(web.DataReader('SPY', data_source='morningstar')['Close'])
  cutoff = '2015-1-1'
  data = data[data.index &lt; cutoff].dropna().copy()
  </code></pre>