On this page
statistics.multimode
Prev: statistics.mode | Up: statistics | Next: statistics.NormalDist
Rel: statistics.correlation, statistics.covariance, statistics.fmean, statistics.geometric_mean
Ref: docs.python.org — statistics.multimode
Tags: #public #python3 #stdlib #statistics
Import
import statistics
from statistics import multimode
Signature & Overview
statistics.multimode(data)
Return a list of the most frequently occurring values.
Usage
import statistics
assert statistics.multimode('aabbc') == ['a', 'b']
assert statistics.multimode([]) == []
Gotchas
- Never raises on empty input (returns
[]) and returns all tied modes in encounter order.
REPL Inspect
from statistics import multimode
help(multimode)
Linked from
Related notes
- tuts/python3/stdlib_module/statistics/mode Linked here; links to this page; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/NormalDist Linked here; links to this page; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/statistics/correlation Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/covariance Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/fmean Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/geometric_mean Linked here; shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/harmonic_mean shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/kde shared tags: #statistics, #stdlib
- tuts/python3/stdlib_module/statistics/kde_random shared tags: #statistics, #stdlib