例如,如何将字典
a = {"col1": 3, "col2":4}
转换为下表?
col1 col2
3 4
如果字典的值是数组,您可以使用
transpose
函数将字典转换为表格,如下所示:
z=dict(`id`val,[`a`b`c,1 2 3]);
transpose(z);
在其他情况下,将字典的值转换为数组,然后使用
transpose
函数,如下例所示:
a = {"col1": 3, "col2":4}
enlist:E(a).transpose()