Home Explore Blog CI



nushell

2nd chunk of `book/nushell_map_imperative.md`
2a2e8c504c9072d8db2ca1644b4da3318eee8f3d1ce562090000000100001082
| [`du`](/commands/docs/du.md), [`ls --du`](/commands/docs/ls.md)                                                                        | `shutil.disk_usage`                  |                                                             |                             |                                                      |
| [`each`](/commands/docs/each.md)<br />[`for`](/commands/docs/for.md)                                                                   | `for`                                | `for`                                                       | `for`                       | `for`                                                |
| [`exit`](/commands/docs/exit.md)                                                                                                       | `exit()`                             | `System.exit`, `kotlin.system.exitProcess`                  | `exit`                      | `exit`                                               |
| [`http get`](/commands/docs/http_get.md)                                                                                               | `urllib.request.urlopen`             |                                                             |                             |                                                      |
| [`first`](/commands/docs/first.md)                                                                                                     | `list[:x]`                           | `List[0]`, `peek`                                           | `vector[0]`, `top`          | `Vec[0]`                                             |
| [`format`](/commands/docs/format.md)                                                                                                   | `format`                             | `format`                                                    | `format`                    | `format!`                                            |
| [`from`](/commands/docs/from.md)                                                                                                       | `csv`, `json`, `sqlite3`             |                                                             |                             |                                                      |
| [`get`](/commands/docs/get.md)                                                                                                         | `dict[\"key\"]`                      | `Map[\"key\"]`                                              | `map[\"key\"]`              | `HashMap["key"]`, `get`, `entry`                     |
| [`group-by`](/commands/docs/group-by.md)                                                                                               | `itertools.groupby`                  | `groupBy`                                                   |                             | `group_by`                                           |
| [`headers`](/commands/docs/headers.md)                                                                                                 | `keys`                               |                                                             |                             |                                                      |
| [`help`](/commands/docs/help.md)                                                                                                       | `help()`                             |                                                             |                             |                                                      |
| [`insert`](/commands/docs/insert.md)                                                                                                   | `dict[\"key\"] = val`                |                                                             | `map.insert({ 20, 130 })`   | `map.insert(\"key\", val)`                           |
| [`is-empty`](/commands/docs/is-empty.md)                                                                                               | `is None`, `is []`                   | `isEmpty`                                                   | `empty`                     | `is_empty`                                           |

Title: Nu Command Equivalents in Other Languages (Continued)
Summary
Continuing the mapping of Nu commands to other languages, this section includes equivalents for commands like `du` (disk usage), `each`/`for` (iteration), `exit` (program exit), `http get` (HTTP requests), `first` (accessing the first element), `format` (string formatting), `from` (data parsing), `get` (accessing data), `group-by` (grouping data), `headers` (retrieving keys), `help` (documentation), `insert` (data insertion), and `is-empty` (checking for emptiness) in Python, Kotlin (Java), C++, and Rust.