3.其他聚合操作
Function Name NaN-safe Version Description
np. sum np. nansum Compute sum of elements
np. prod np. nanprod Compute product of elements
пр. mean np. nanmean Compute mean of elements
np. std np. nanstd Compute standard deviation
np. var np. nanvar Compute variance
np. min np. nanmin Find minimum value
np. max np. nanmax Find maximum value
np. argmin np. nanargmin Find index of minimum value
np. argmax np. nanargmax Find index of maximum value
np. median np. nanmedian Compute median of elements
np. percentile np. nanpercentile Compute rank-based statistics of elements
пp, any N/A Evaluate whether any elements are true
np. all N/A Evaluate whether all elements are true
np. power 幕运算
--------------------------------------------------------------------------------------------
пp.any()和пp.all()
#any 检测一个B0OL数组中,是否全少存在一个True
#all 检测一个B0OL数组中,是否全为True
bool_list=np.array([False, False, False, False]) bool_list.any()
#运行输出
False
bool_list.all()
#运行输出
False
标签:elements,Compute,运算,value,np,False,numpy,any From: https://www.cnblogs.com/988MQ/p/16886115.html