dfr drop-nulls
for dataframe> dfr drop-nulls {flags} (subset)
subset
: subset of columns to drop nullsinput | output |
---|---|
any | any |
drop null values in dataframe
>letdf= ([[ab]; [12] [30] [12]] |dfr into-df);
letres= ($df.b/$df.b);
leta= ($df|dfr with-column$res--nameres);
$a|dfr drop-nulls
╭───┬───┬───┬─────╮
│# │ a │ b │ res │
├───┼───┼───┼─────┤
│0│1│2│1│
│1│1│2│1│
╰───┴───┴───┴─────╯
drop null values in dataframe
>lets= ([120034] |dfr into-df);
($s/$s) |dfr drop-nulls
╭───┬─────────╮
│# │ div_0_0 │
├───┼─────────┤
│0│1│
│1│1│
│2│1│
│3│1│
╰───┴─────────╯
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_drop-nulls.html