How to convert a Python dictionary (dict) to a Pandas dataframe?

list1 = [...]
list2 = [...]
df = pd.DataFrame({"field1": list1, "field2": list2})

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Digest

Digest

59 Followers

One Digest At a Time. I value your time! #datascience #dataanalyst #datascientist #probability #statistics #ML #AI #savetime #digest