W3cubDocs

/Nushell

math median for math

Computes the median of a list of numbers.

Signature

> math median {flags}

Input/output types:

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

Examples

Compute the median of a list of numbers

> [389121215] |math median
10.5

Compute the medians of the columns of a table

> [{a:1b:3} {a:2b:-1} {a:-3b:5}] |math median
╭───┬───╮
a1
b3
╰───┴───╯

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