Empty DataFrame returned when grouping on datetime column
import datetime
import numpy
import pandas

def simple_test(use_date=True):
    data = [
            [1, '2012-01-01', 1.0],
            [2, '2012-01-02', 2.0],
            [3, None, 3.0]
          ]
    if use_date:
        data = [[row[0], datetime.datetime.strptime(row[1], '%Y-%m-
%d').date() if row[1] else None, row[2]] for row in data]
    df = pandas.DataFrame({'key': [x[0] for x in data], 'date': [x[1]
for x in data], 'value': [x[2] for x in data]})
    df['weights'] = df['value']/df['value'].sum()
    gb = df.groupby('date').aggregate(numpy.sum)

```
print 'II) Using date objects' if use_date else 'I) Using date
```

strings'
    print df
    print ''
    print gb

if **name** == '**main**':
    simple_test(use_date=False)
    print '*' \* 40
    simple_test(use_date=True)
