sciPy stats.itemfreq() function | Python Last Updated : 15 Jan, 2022 Comments Improve Suggest changes Like Article Like Report scipy.stats.itemfreq(arr, axis = None) function helps us to calculate the item frequencies. Parameters : arr : [array_like] input array. Results : 2D array with item frequency. Code #1: Use of variation() Python3 # cumulative frequency from scipy import stats import numpy as np arr = [14, 31, 27, 27, 31, 13, 14, 13] print ("Itemfrequency : \n", stats.itemfreq(arr)) print ("\n\nBincount : \n", np.bincount(arr)) Output: Itemfrequency : [[13 2] [14 2] [27 2] [31 2]] Bincount : [0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 2] Comment More infoAdvertise with us Next Article sciPy stats.itemfreq() function | Python V vishal3096 Follow Improve Article Tags : Python Python-scipy Python scipy-stats-functions Practice Tags : python Similar Reads sciPy stats.tmax() function | Python scipy.stats.tmax(array, lowerlimit=None, axis=0, inclusive=True) function calculates the trimmed maximum of the array elements along with ignoring the values lying outside the specified limits, along the specified axis. Parameters : array: Input array or object having the elements to calculate the t 2 min read scipy stats.tmin() function | Python scipy.stats.tmin(array, lowerlimit=None, axis=0, inclusive=True) function calculates the trimmed minimum of the array elements along with ignoring the values lying outside the specified limits, along the specified axis. Parameters : array: Input array or object having the elements to calculate the m 2 min read sciPy stats.trim1() function | Python scipy.stats.trim1(a, proportiontocut, tail='right') function slices off the portion of elements in the array from one end of the passed array distribution. Parameters : arr : [array_like] Input array or object to trim. tail : [optional] {'left', 'right'} Defaults to right. proportiontocut : Proporti 2 min read sciPy stats.relfreq() function | Python scipy.stats.relfreq(a, numbins, defaultreallimits, weights) is a relative frequency histogram, using the histogram function. Parameters : arr : [array_like] input array. numbins : Number of bins to use for the histogram. [Default = 10] defaultreallimits : (lower, upper) range of the histogram. weigh 2 min read sciPy stats.cumfreq() function | Python scipy.stats.cumfreq(a, numbins, defaultreallimits, weights) works using the histogram function and calculates the cumulative frequency histogram. It includes cumulative frequency binned values, width of each bin, lower real limit, extra points. Parameters : arr : [array_like] input array. numbins : 2 min read Like