Back to Lo

Core Mode

docs/data/core-mode.md

1.53.0219 B
Original Source

Returns the mode(s), i.e., the most frequent value(s) in a collection. If multiple values share the highest frequency, returns all. Empty input yields an empty slice.

go
lo.Mode([]int{2, 2, 3, 3})
// []int{2, 3}