Skip to content

For generating a new column from two given columns, how can I reference these columns by index? #1110

Answered by geekscrapy
halloleo asked this question in Q&A
Discussion options

You must be logged in to vote

Hey!

One (longish) way to do this is with
=visibleCols[1].getValue(row)

This gets the visible column by index (in this case 1), and then gets the raw value of that row. There are other ways to get the data, based on what you want and speed (getTypedValue, getDisplayValue etc.), see here: https://www.visidata.org/docs/api/columns#visidata.Column.getValue

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@halloleo
Comment options

@saulpw
Comment options

@halloleo
Comment options

@saulpw
Comment options

@halloleo
Comment options

Answer selected by anjakefala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants