title: Indexing timeseries by date string
body: <p>Given a timeseries, <code>s</code>, with a datetime index I expected to be able to index the timeseries by the date string. Am I misunderstanding how this should work?</p>
  
  <pre><code>import pandas as pd
  url = 'http://ichart.finance.yahoo.com/table.csvs=SPY&amp;d=12&amp;e=4&amp;f=2012&amp;g=d&amp;a=01&amp;b=01&amp;c=2001&amp;ignore=.csv'  
  df = pd.read_csv(url, index_col='Date', parse_dates=True)  
  s = df['Close']
  s['2012-12-04']
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>TimeSeriesError                           Traceback (most recent call last)
  &lt;ipython-input-244-e2ccd4ecce94&gt; in &lt;module&gt;()
        2 df = pd.read_csv(url, index_col='Date', parse_dates=True)  
        3 s = df['Close']  
  ----&gt; 4 s['2012-12-04']
  
      G:\Python27-32\lib\site-packages\pandas\core\series.pyc in __getitem__(self, key)
      468     def __getitem__(self, key):
      469         try:
  --&gt; 470             return self.index.get_value(self, key)
      471         except InvalidIndexError:
      472             pass
  
      G:\Python27-32\lib\site-packages\pandas\tseries\index.pyc in get_value(self, series, key)  
  
     1030 
     1031             try:
  -&gt; 1032                 loc = self._get_string_slice(key)
     1033                 return series[loc]
     1034             except (TypeError, ValueError, KeyError):
  
  G:\Python27-32\lib\site-packages\pandas\tseries\index.pyc in _get_string_slice(self, key)
     1077         asdt, parsed, reso = parse_time_string(key, freq)
     1078         key = asdt
  -&gt; 1079         loc = self._partial_date_slice(reso, parsed)
     1080         return loc
     1081 
  
  G:\Python27-32\lib\site-packages\pandas\tseries\index.pyc in _partial_date_slice(self, reso, parsed)
      992     def _partial_date_slice(self, reso, parsed):
      993         if not self.is_monotonic:
  --&gt; 994             raise TimeSeriesError('Partial indexing only valid for ordered '
      995                                   'time series.')
      996 
  
  TimeSeriesError: Partial indexing only valid for ordered time series. 
  </code></pre>
  
  <p>To be more specific (and perhaps pedantic..), what's the difference between the 2 Timeseries here:</p>
  
  <pre><code>import pandas as pd
  url = 'http://ichart.finance.yahoo.com/table.csv?        s=SPY&amp;d=12&amp;e=4&amp;f=2012&amp;g=d&amp;a=01&amp;b=01&amp;c=2001&amp;ignore=.csv'
  s = pd.read_csv(url, index_col='Date', parse_dates=True)['Close']
  rng = date_range(start='2011-01-01', end='2011-12-31')
  ts = Series(randn(len(rng)), index=rng)
  print ts.__class__
  print ts.index[0].__class__
  print s1.__class__
  print s1.index[0].__class__
  print ts[ts.index[0]]
  print s[s.index[0]]
  print ts['2011-01-01']
  try:
      print s['2012-12-05']
  except:
      print "doesn't work" 
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>&lt;class 'pandas.core.series.TimeSeries'&gt;
  &lt;class 'pandas.lib.Timestamp'&gt;
  &lt;class 'pandas.core.series.TimeSeries'&gt;
  &lt;class 'pandas.lib.Timestamp'&gt;
  -0.608673793503
  141.5
  -0.608673793503
  doesn't work
  </code></pre>