3, 4, 5, 6])#找到数组中所有大于3的元素的索引indices=np.where(arr>3)print(indices)#输出结果: (array([4, 5, 6]),)2、基于一个条件在两个数组之间选择元素...E列,如果A列中大于4且D列小于8,#则E列为True,否则为Falsedf['E']=np.where( (df['A']>3)&(df['D']3]choicelist=[x, x**2]result=np.select(...choicelist, 42)print(result)#输出结果:[0 1 2 42 16 25]score_array=np.array([56, 61, 95])score_result=np.select...]df['tier']=np.select(conditions, values, default="other")print(df) 输出结果: