nushell.github.io
nushell.github.io copied to clipboard
"Adding a new column" section is having an existential crisis
https://www.nushell.sh/book/working_with_tables.html#changing-data-in-a-table
We can use the add command to add a new column to the table. Let's look at an example:
This goes on to give an example that adds a new row using the insert
command.
(I would try to work out the commands and suggest some changes, but I don't have time right now and wanted to log the issue.)
I'll add there doesn't seem to be an add
command, but insert
inserts a column, perhaps the tables need to be "pivoted" and the reference to add
fixed.
Thanks for the bug report! Looks like this was fixed in 81e1c76d7ee44eb3f08c7ef7cfe52f543e84d5e9
In the latest main, insert
is now part of update
so we may want to mark this as something to go fix in the current docs. The other one was that nth
was moved into select
as well.
This chapter has been updated at some point to use the new command names. This issue no longer exists and can be closed.
I've not revisited in nu, but the explanation looks clearer 💥