W3cubDocs

/Nushell

math mode for math

Returns the most frequent element(s) from a list of numbers or tables.

Signature

> math mode {flags}

Input/output types:

input output
list<duration> list<duration>
list<filesize> list<filesize>
list<number> list<number>
table record

Examples

Compute the mode(s) of a list of numbers

> [339121215] |math mode
╭───┬────╮
│0│3│
│1│12│
╰───┴────╯

Compute the mode(s) of the columns of a table

> [{a:1b:3} {a:2b:-1} {a:1b:5}] |math mode
╭───┬────────────╮
││╭───┬───╮│
│a││0│1││
││╰───┴───╯│
││╭───┬────╮│
│b││0│-1││
│││1│3││
│││2│5││
││╰───┴────╯│
╰───┴────────────╯

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/math_mode.html