dictionary to a dataframe pandas arrays must all be same length

Solutions on MaxInterview for dictionary to a dataframe pandas arrays must all be same length by the best coders in the world

showing results for - "dictionary to a dataframe pandas arrays must all be same length"
Cohen
10 Mar 2018
1pd.DataFrame.from_dict(df, orient='index').transpose() #A
2
3pd.DataFrame(dict([ (k,pd.Series(v)) for k,v in df.items() ])) #B (Better)