arr = np.array([[1,2,100,4,5,6],[1,1,100,3,5,5],[2,2,4,4,6,6]])

方法一:

count = np.bincount(arr[:,2])  # 找出第3列最频繁出现的值
value = np.argmax(count)

方法二:

from collections import Counter

value = Counter(arr[:,2]).most_common()

 

相关文章:

  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2021-12-04
  • 2022-12-23
相关资源
相似解决方案