Roby - 1 year ago 56
Python Question

# Matrix of Key-Value Pairs / Dict

I have several objects from

type dict
with different keys. I want to create a table
with all keys
and foreach object one row. If one key isn't available, it should be empty.

For Example:

x1=dict( {"a":2, "b":3})
x2=dict( {"a":2, "b":3, "c":2})


and i want to get something like this:

"a","b","c"
2,3,
2,3,2


import pandas as pd