I have two python dictionaries.
Sample:
{
'hello' : 10
'phone' : 12
'sky' : 13
}
{
'hello' : 8
'phone' :15
'red' :4
}
This is the dictionary of counts of words in books 'book1' and 'book2' respectively.
How can I generate a pd dataframe, which looks like this:
hello phone sky red
book1 10 12 13 NaN
book2 8 15 NaN 4
I have tried :
pd.DataFrame([words,counts])
It generated:
hello phone sky red
0 10 12 13 NaN
1 8 15 NaN 4
How can I genrate a required output?