I'm a neophyte to pandas and have been struggling to convert a Dict to a df using pd.DataFrame(Dict)
. Here's further detail: This Dict is part of a for loop that in every iteration reads in a new input file. As a result, Dict Values (lists) update every time and take different List sizes. The problem is, my code fails to execute pd.DataFrame(Dict)
once Dict contains blank lists (Values) for all Keys and spits out: "ValueError: If using all scalar values, you must pass an index"
Dict = {'Title': [],
'Organization': [],
'City': [],
'Company': []}
Could anybody shed some light on this? Thanks a million in advance.