【发布时间】:2020-09-21 09:53:17
【问题描述】:
我每年有一个二维温度值数组,其中每年都有几个值。所以数组看起来像这样:
[[1960, a, b, c, d, e, f ...],
[1960, a1, b1, c1, d1, e1, f1 ...],
[1960, a2, b2, c2, d2, e2, f2 ...],
[1961, a, b, c, d, e, f ...],
[1961, a1, b1, c1, d1, e1, f1 ...],
[1961, a2, b2, c2, d2, e2, f2 ...],
[1962, a, b, c, d, e, f ...],
[1962, a1, b1, c1, d1, e1, f1 ...],
[1962, a2, b2, c2, d2, e2, f2 ...]....]
我需要为第 0 列是 1961 的行提取第 1 列中的所有内容(因此所有 a 值)。
有人知道我会怎么做吗? 谢谢!
【问题讨论】:
标签: python numpy numpy-ndarray data-processing numpy-slicing