For finding the element in the array with the highest frequency argmax() method is used but I was also trying to iterate over the output and then print the number with the highest frequency. I have attached the entire code below. Kindly help with this
a=np.array([0,1,10,10,2,-8,6,6,6,6,8,10])
c=np.unique(a,return_counts=True)
print©
for number in c[1]:
if number ==np.max©:
m=c[1].index(number)
print(‘The number occuring highest number of times is {} and it is occuring {} times’.format(c[0][m],number))