How do I convert a python dictionary to a pandas data frame. This is how I currently do it which is not at all elegant.
import pandas as pd
MyDict={'key1':'value1','key2' : 'value2'}
MyDF=pd.DataFrame.from_dict(MyDict,orient='index',dtype=None)
MyDF.index.name = 'Keys'
MyDF.reset_index(inplace=True)
I just want the 'key:value' pair in MyDict as the rows of a pandas dataframe.