How do I create nested tables ? #2611
-
How do I create nested tables ? Visidata can of course read them, I can expand and collapse the columns, but I can't find a way to actually create a table inside of a cell of my top-level table. I can press enter to get the details of the row, then enter again to get the details of the cell, but if I had two lines there and quit with q, nothing is saved. However, if I follow these steps to modify a cell containing a nested table, the changes are saved. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What do you mean by nested table? It would help if you can demonstrate with a short example file that has a nested table. |
Beta Was this translation helpful? Give feedback.
I see. For nested table, you are referring to cells containing sequences like lists or dictionaries, which can be expanded with
expand-col
.For your problem 1, that saving expanded columns loses the ability to contract them, I don't know if that's desired behavior. Maybe @saulpw can comment?
For problem 2, where you want to add to the list contained in a cell. You can use
z=
(forsetcell-expr
) to set the current cell to any Python expression. Expressions you could use to add a value are:[1,2,3,4]
A + [4]
curcol + [4]
(reading the value of the current column where the cursor is, instead of using the column nameA
)If you want to simplify this process, you could make a custom command in yo…