【发布时间】:2020-11-18 20:11:47
【问题描述】:
我有一本字典 - {'Car': ['a', 'b'], 'Bike': ['q', 'w', 'e']}
我想生成这样的数据框-
S.no. | vehicle | model
1 | Car | a
2 | Car | b
2 | Bike | q
2 | Bike | w
2 | Bike | e
我尝试了df = pd.DataFrame(vDict),但出现ValueError: arrays must all be same length 错误。请帮忙?
【问题讨论】: