Some plugins for my daily work with VisiData:
git clone https://github.com/thomd/visidata-plugins.git
cd visidata-plugins
make install
Uninstall with
make uninstall
Note
The plugins are only tested on macOS.
Hide all columns which contain no data.
Use command hide-empty-cols.
echo -e "col1,col2,col2,col4\n1,,,\n5,,7," | vd
Before:
| col1 | col2 | col3 | col4 |
|---|---|---|---|
| 1 | |||
| 5 | 7 |
After:
| col1 | col3 |
|---|---|
| 1 | |
| 5 | 7 |
One-hot encode the currently selected column.
This function creates a new binary column for each unique value in the selected column, indicating the presence (1) or absence (0) of that value in each row. The new columns are inserted immediately after the original column.
This prevents assuming an ordinal relationship between categories (e.g., "red" > "green") when using categorical data in linear regression, logistic regression and neural networks.
Use command one-hot-encode.
echo -e "color\nred\ngreen\nred\nblue\ngreen" | vd
Before:
| color |
|---|
| red |
| green |
| red |
| blue |
After:
| color | color_blue | color_green | color_red |
|---|---|---|---|
| red | 0 | 0 | 1 |
| green | 0 | 1 | 0 |
| red | 0 | 0 | 1 |
| blue | 1 | 0 | 0 |
Retrieve a Salesforce record of the selected Salesforce ID in a new sheet.
Requires to have the sf Salesforce CLI installed and having set a default authenticated org.
Use command retrieve-salesforce-record or the key 0.
echo -e "Account ID\n0019V0000138V4QQAU" | vd