dfr filter-with
for dataframe or lazyframe> dfr filter-with {flags} (mask or expression)
mask or expression
: boolean mask used to filter datainput | output |
---|---|
any | any |
Filter dataframe using a bool mask
>letmask= ([truefalse] |dfr into-df);
[[ab]; [12] [34]] |dfr into-df|dfr filter-with$mask
╭───┬───┬───╮
│# │ a │ b │
├───┼───┼───┤
│0│1│2│
╰───┴───┴───╯
Filter dataframe using an expression
> [[ab]; [12] [34]] |dfr into-df|dfr filter-with ((dfr cola) >1)
╭───┬───┬───╮
│# │ a │ b │
├───┼───┼───┤
│0│3│4│
╰───┴───┴───╯
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_filter-with.html