Flexible dropping of rows (by desired row number) (#3917)

We very well support `nth 0 2 3 --skip 1 4` to select particular rows and skip some using a flag. However, in practice we deal with tables (whether they come from parsing or loading files and whatnot) where we don't know the size of the table up front (and everytime we have these, they may have different sizes). There are also other use cases when we use intermediate tables during processing and wish to always drop certain rows and **keep the rest**.

Usage:

```
... | drop nth 0
... | drop nth 3 8
```
This commit is contained in:
Andrés N. Robalino
2021-08-13 12:48:05 -05:00
committed by GitHub
parent 1bd3fdd912
commit 463dd48180
5 changed files with 98 additions and 13 deletions

View File

@ -150,6 +150,7 @@ pub fn create_default_context(interactive: bool) -> Result<EvaluationContext, Bo
whole_stream_command(Every),
whole_stream_command(Nth),
whole_stream_command(Drop),
whole_stream_command(DropNth),
whole_stream_command(Format),
whole_stream_command(FileSize),
whole_stream_command(Where),