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\':
Accepts a dict as argument and returns a dataframe with the keys of the dict as index and values as a column.
def dict_to_df(d): df=pd.DataFrame(d.items()) df.set_index(0, inplace=True) return df