【发布时间】:2014-08-27 15:13:52
【问题描述】:
这是一个关于在 Mathematica 中重新排列嵌套列表部分的问题。
我有一个嵌套列表:DatenList = {{1, {100, 200}}, {2, {101, 201}}, {3, {102, 202}}};
并想获得另一个列表,例如{{1,100},{2,101}}
有没有比temp = DatenList[[1 ;; 2, 1]];
temp2 = DatenList[[1 ;; 2, 2]][[;; , 1]];
temp = {temp}~Join~{temp2};
finalList = Transpose[temp]更简洁的方法
产生{{1, 100}, {2, 101}}
【问题讨论】:
标签: list nested wolfram-mathematica extract