You can create a pandas pd.DataFrame from a list of dicts (lst
) using the pd.DataFrame(lst)
constructor.
a = {"x": 1, "y": 2} b = {"x": 3, "y": 2} c = {"x": 6, "y": 9} df = pd.DataFrame([a,b,c])
df
will look like this:
You can create a pandas pd.DataFrame from a list of dicts (lst
) using the pd.DataFrame(lst)
constructor.
a = {"x": 1, "y": 2} b = {"x": 3, "y": 2} c = {"x": 6, "y": 9} df = pd.DataFrame([a,b,c])
df
will look like this:
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow