我有一个看起来像这样的表:
我正在寻找一个表格,它给出了字段中元素的频率计数l_0, l_1, l_2, l_3
。
例如,输出应如下所示:
| author_id | year | l_o.name | l_0.count| l1.name | l1.count | l2.name | l2.count| l3.name | l3.count|
| 2164089123 | 1987 | biology | 3 | botany | 3 | | | | |
| 2595831531 | 1987 | computer science | 2 | simulation | 2 | computer simulation | 2 | mathematical model | 2 |
编辑:
在某些情况下,数组字段可能有不止一种类型的元素。例如l_0
可以是 ['biology', 'biology', 'geometry', 'geometry']
. 在这种情况下,字段的输出l_0, l_1, l_2, l_3
将是一个嵌套的重复字段,其中包含所有元素l_0.name
以及l_0.count
.