Statistics Functions

statistics.multimode()

Return every most frequent hashable value in first-encounter order. Empty data returns an empty list.

Formal Syntax & Structure

python syntaxpython
statistics.multimode(data)

Parameters & Attributes

NameTypeDescription
dataiterable of hashable objectsObservations to count by value.

Return Value

list

List of tied modes in encounter order.

Working Example

Example Snippetpython
import statisticsprint(statistics.multimode([3, 2, 1, 2, 3]))
Python Reference