I am trying to convert an dictionary to dataframe which contains nested list.the dataframe output i got is follows,
import pandas as pd
data = {'a': 'test', 'b': 1657, 'c': 'asset', 'd': [['2089', '0.0'], ['2088', '0.0']], 'e': [['2088', '0.0'], ['2088', '0.0'], ['2088', '0.00']]}
df = pd.DataFrame({ key:pd.Series(value) for key, value in data.items() })
My output is
a b c d e
0 test 1657.0 asset [2089, 0.0] [2088, 0.0]
1 NaN NaN NaN [2088, 0.0] [2088, 0.0]
2 NaN NaN NaN NaN [2088, 0.00]
the required output is
a b c d1 d2 e1 e2
0 test 1657.0 asset 2089 0.0 2088 0.0
1 NaN NaN NaN 2088 0.0 2088 0.0
2 NaN NaN NaN NaN NaN 2088 0.0
Thanks in advance for your efforts.