pydata/pandas — pull request #3931 by jreback (2013-06-17 01:37:13+00:00)
Title: ENH: (GH3925) Allow indexing a time series index with a datetime object / seconds reso string

closes #3925

Allow all of the following to succeed (previously only ``.loc`` would work)

```
In [11]: df = DataFrame(randn(5,5),columns=['open','high','low','close','volume'],index=date_range('2012-01-02 18:01:00',periods=5,tz='US/Central',freq='s'))

In [12]: df
Out[12]:
open high low close volume
2012-01-02 18:01:00-06:00 0.131243 0.301542 0.128027 0.804162 1.296658
2012-01-02 18:01:01-06:00 0.341487 1.548695 0.703234 0.904201 1.422337
2012-01-02 18:01:02-06:00 -1.050453 -1.884035 1.537788 -0.821058 0.558631
2012-01-02 18:01:03-06:00 0.846885 1.045378 -0.722903 -0.613625 -0.476531
2012-01-02 18:01:04-06:00 1.186823 -0.018299 -0.513886 -1.103269 -0.311907

In [13]: df.loc[[df.index[2]]]
Out[13]:
open high low close volume
2012-01-02 18:01:02-06:00 -1.050453 -1.884035 1.537788 -0.821058 0.558631

In [14]: df['2012-01-02 18:01:02']
Out[14]:
open high low close volume
2012-01-02 18:01:02-06:00 -1.050453 -1.884035 1.537788 -0.821058 0.558631

In [15]: df[df.index[2]]
Out[15]:
open high low close volume
2012-01-02 18:01:02-06:00 -1.050453 -1.884035 1.537788 -0.821058 0.558631

```