حالت(Mode)

مقدار Mode مقداری است که بیشتر بارها ظاهر می شود:




99,86, 87, 88, 111,86, 103, 87, 94, 78, 77, 85,86 = 86




ماژول SciPy روشی برای این دارد:




مثال


Use the SciPy mode() method to find the
number that appears the most:



from scipy import stats

speed =
[99,86,87,88,111,86,103,87,94,78,77,85,86]

x = stats.mode(speed)

print(x)