I have a Python dictionary like the following:
{u\'2012-06-08\': 388,
u\'2012-06-09\': 388,
u\'2012-06-10\': 388,
u\'2012-06-11\': 389,
u\'2012-06-12\':
As explained on another answer using pandas.DataFrame()
directly here will not act as you think.
What you can do is use pandas.DataFrame.from_dict with orient='index'
:
In[7]: pandas.DataFrame.from_dict({u'2012-06-08': 388,
u'2012-06-09': 388,
u'2012-06-10': 388,
u'2012-06-11': 389,
u'2012-06-12': 389,
.....
u'2012-07-05': 392,
u'2012-07-06': 392}, orient='index', columns=['foo'])
Out[7]:
foo
2012-06-08 388
2012-06-09 388
2012-06-10 388
2012-06-11 389
2012-06-12 389
........
2012-07-05 392
2012-07-06 392