Filters

CommandDescription
allTest if every element of the input fulfills a predicate expression.
anyTests if any element of the input fulfills a predicate expression.
appendAppend any number of rows to a table.
collectCollect the stream and pass it to a block.
columnsGiven a record or table, produce a list of its columns' names.
compactCreates a table with non-empty rows.
defaultSets a default row's column if missing.
dropRemove items/rows from the end of the input list/table. Counterpart of `skip`. Opposite of `last`.
drop columnRemove N columns at the right-hand end of the input table. To remove columns by name, use `reject`.
drop nthDrop the selected rows.
eachRun a closure on each row of the input list, creating a new list with the results.
each whileRun a block on each row of the input list until a null is found, then create a new list with the results.
enumerateEnumerate the elements in a stream.
everyShow (or skip) every n-th row, starting from the first one.
filterFilter values based on a predicate closure.
findSearches terms in the input.
firstReturn only the first several rows of the input. Counterpart of `last`. Opposite of `skip`.
flattenFlatten the table.
getExtract data using a cell path.
groupGroups input into groups of `group_size`.
group-bySplits a list or table into groups, and returns a record containing those groups.
headersUse the first row of the table as column names.
insertInsert a new column, using an expression or closure to create each row's values.
interleaveRead multiple streams in parallel and combine them into one stream.
into valueInfer nushell datatype for each cell.
is-emptyCheck for empty values.
is-not-emptyCheck for non-empty values.
itemsGiven a record, iterate on each pair of column name and associated value.
joinJoin two tables.
lastReturn only the last several rows of the input. Counterpart of `first`. Opposite of `drop`.
lengthCount the number of items in an input list or rows in a table.
linesConverts input to lines.
mergeMerge the input with a record or table, overwriting values in matching columns.
moveMove columns before or after other columns.
par-eachRun a closure on each row of the input list in parallel, creating a new list with the results.
prependPrepend any number of rows to a table.
queryShow all the query commands
query jsonexecute json query on json file (open --raw <file> | query json 'query string')
query xmlexecute xpath query on xml
rangeReturn only the selected rows.
reduceAggregate a list to a single value using an accumulator closure.
rejectRemove the given columns or rows from the table. Opposite of `select`.
renameCreates a new table with columns renamed.
reverseReverses the input list or table.
rollRolling commands for tables.
roll downRoll table rows down.
roll leftRoll record or table columns left.
roll rightRoll table columns right.
roll upRoll table rows up.
rotateRotates a table or record clockwise (default) or counter-clockwise (use --ccw flag).
selectSelect only these columns or rows from the input. Opposite of `reject`.
shuffleShuffle rows randomly.
skipSkip the first several rows of the input. Counterpart of `drop`. Opposite of `first`.
skip untilSkip elements of the input until a predicate is true.
skip whileSkip elements of the input while a predicate is true.
sortSort in increasing order.
sort-bySort by the given columns, in increasing order.
split listSplit a list into multiple lists using a separator.
split-bySplit a record into groups.
takeTake only the first n elements of a list, or the first n bytes of a binary value.
take untilTake elements of the input until a predicate is true.
take whileTake elements of the input while a predicate is true.
teeCopy a stream to another command in parallel.
transposeTransposes the table contents so rows become columns and columns become rows.
uniqReturn the distinct values in the input.
uniq-byReturn the distinct values in the input by the given column(s).
updateUpdate an existing column to have a new value.
update cellsUpdate the table cells.
upsertUpdate an existing column to have a new value, or insert a new column.
valuesGiven a record or table, produce a list of its columns' values.
whereFilter values based on a row condition.
windowCreates a sliding window of `window_size` that slide by n rows/elements across input.
wrapWrap the value into a column.
zipCombine a stream with the input.