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
╭───┬────╮
03
112
╰───┴────╯

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

> [{a:1b:3} {a:2b:-1} {a:1b:5}] |math mode
╭───┬────────────╮
╭───┬───╮
a01
╰───┴───╯
╭───┬────╮
b0-1
13
25
╰───┴────╯
╰───┴────────────╯

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