From a886a091d9eedb9145c4db15cce4a6e44dafefee Mon Sep 17 00:00:00 2001 From: nome Date: Sat, 20 Sep 2025 16:19:25 +0200 Subject: [PATCH] Add overview of table operations to Cheat Sheet Some table operations are arguably confusingly named, espcially for new nu users. Since the discussion in nushell/nushell#13779 didn't get much traction, at least there should be an easy to find an overview. --- book/cheat_sheet.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/book/cheat_sheet.md b/book/cheat_sheet.md index d30d35eb60f..6878a6ba118 100644 --- a/book/cheat_sheet.md +++ b/book/cheat_sheet.md @@ -297,6 +297,18 @@ $teams_scores | drop column # => ╰───┴───────────────────────┴───────╯ ``` +### Overview of table operations + +| part of table | keep | discard | add | +|-|-|-|-| +| specific rows | get | drop nth | - | +| range of rows | slice | drop nth | - | +| first n rows | first/take, take while, take until | skip, skip while, skip until | prepend | +| last n rows | last | drop | append | +| every nth row | every | every --skip | - | +| specific columns | select | reject | insert plus move | +| last n columns | - | drop column | insert | + ## Files and Filesystem open a text file with the default text editor: