【发布时间】:2021-10-31 08:26:19
【问题描述】:
我正在尝试将以下字典:partlistzonesdef(有 50 个键)转换为数据框: 假设我们有字典:
{1: [60, 127],
2: [21, 43, 61, 19],
3: [186, 154, 37],
4: [99, 68, 80, 87, 128, 98]}
如何将其转换为这样的数据框:
Index Area
0 1 60
1 1 127
2 2 21
3 2 43
4 2 61
5 2 19
6 3 186
7 3 154
8 3 37
等等?
【问题讨论】:
标签: python pandas dataframe dictionary for-loop