Python in visidata #1294
-
|
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
|
These are not newbe questions at all! For the second one, the answer can be found here: https://www.visidata.org/docs/rows/
|
Beta Was this translation helpful? Give feedback.
-
|
For the first, I do not think there is good comprehensive documentation about this, yet. Essentially, there are commands that accept regex expressions and Python expressions. For the ones that accept Python expressions, you can pass column names as variables, and the expression will be performed on every row in that column. For example, Other example commands that accept Python expressions are To learn which commands accept a Python expression as input, you can open the manpage ( |
Beta Was this translation helpful? Give feedback.
-
|
@Shahin-rmz Have a look at these discussions where I've been trying to understand similar things. I don't know if you can define a function 'live' inside visidata, but you can certainly define a function in your .visidatarc which will load when you start visidata and be available for you to use inside Python expressions. If you get more serious, you can also create Python plugins: |
Beta Was this translation helpful? Give feedback.
These are not newbe questions at all!
For the second one, the answer can be found here: https://www.visidata.org/docs/rows/