ID EN
Statistics

multimode

Python 3.11

Return a list of the most frequently occurring values in the order they were first encountered in the data. Will return more than one result if there are multiple modes or an empty list if the data is empty:

Syntax

PYTHON
statistics.multimode(data)

Examples

Example 1
PYTHON
>>> multimode('aabbbbccddddeeffffgg')
['b', 'd', 'f']
>>> multimode('')
[]