我有一个数据集本文件:你知道吗
2017-03-01 31.8 28.0 32.6
2017-04-01 31.6 28.0 32.6
2017-05-01 31.0 27.0 32.6
2017-06-01 31.0 27.0 32.4
2017-07-01 31.0 27.0 31.4
2017-08-01 30.0 27.0 32.6
除第一列外,其余列均为温度。我想做的是比较第4列的值(从右起的最后一列)和其他列的值,以确定温度值是否不大于或小于2度(第4列)。例如,我想计算三列(按行)的值在30.6到34.6之间的次数。你知道吗
熊猫有这样的功能吗?你知道吗
根据您的样本数据,您可以尝试:
数据输入
如果我正确理解您的问题,您想知道所有值在第四列±2范围内的次数(列编号为0,1,2,3):
列
a
b
的值小于c
的2值介于30.6到34.6之间
值介于30.6到34.6之间,一行中的所有列都为真
所有列的值在30.6到34.6之间的行计数
相关问题 更多 >
编程相关推荐