import pandas as pd
# create the dictionary
new_dict = {'apple':5, 'banana':3, 'cat':5}
# convert dictionary to dataframe
df = pd.DataFrame.from_dict(new_dict, orient='index', columns=['count'])
# print dataframe
print(df)
We set the orient parameter to 'index', which indicates that the keys of the dictionary should be used as the row labels in the resulting DataFrame.
We also specify the columns parameter to create a new column called 'count' in the DataFrame, which will contain the values from the original dictionary.