W3cubDocs

/Nushell

dfr cumulative for dataframe

Cumulative calculation for a series.

Signature

> dfr cumulative {flags} (type)

Flags

  • --reverse, -r: Reverse cumulative calculation

Parameters

  • type: rolling operation

Input/output types:

input output
any any

Examples

Cumulative sum for a series

> [12345] |dfr into-df|dfr cumulativesum
╭───┬──────────────────╮
# │ 0_cumulative_sum │
├───┼──────────────────┤
01
13
26
310
415
╰───┴──────────────────╯

Tips: Dataframe commands were not shipped in the official binaries by default, you have to build it with --features=dataframe flag

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