I create DataFrame from a list of dicts like this:
pd.DataFrame([{"id":"a","v0":3,"v2":"foo"},
{"id":"b","v1":1,"v4":"ouch"}]).set_index(
"id",verify_integrity=True)
v0 v2 v1 v4
id
a 3.0 foo NaN NaN
b NaN NaN 1.0 ouch
Alas, for some inputs I run out of RAM in the DataFrame constructor, and I wonder if there is a way to make pandas produce a sparse DataFrame from the list of dicts.