https://github.com/thomd/visidata-plugins
VisiData plugins
https://github.com/thomd/visidata-plugins
cli visidata
Last synced: 8 months ago
JSON representation
VisiData plugins
- Host: GitHub
- URL: https://github.com/thomd/visidata-plugins
- Owner: thomd
- License: mit
- Created: 2022-11-14T20:08:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-22T21:25:38.000Z (over 3 years ago)
- Last Synced: 2025-03-30T19:14:45.699Z (about 1 year ago)
- Topics: cli, visidata
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VisiData Plugins
Some plugins for my daily work with [VisiData](https://www.visidata.org/):
- [hide-empty-cols](#hide-empty-cols)
- [one-hot-encode](#one-hot-encode)
- [retrieve-salesforce-record](#retrieve-salesforce-record)
## Install
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-empty-cols`
Hide all columns which contain no data.
### Usage
Use command `hide-empty-cols`.
### Example
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`
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.
### Usage
Use command `one-hot-encode`.
### Example
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-salesforce-record`
Retrieve a Salesforce record of the selected Salesforce ID in a new sheet.
Requires to have the `sf` [Salesforce CLI](https://developer.salesforce.com/tools/salesforcecli) installed and having set a default authenticated org.
### Usage
Use command `retrieve-salesforce-record` or the key `0`.
### Example
```
echo -e "Account ID\n0019V0000138V4QQAU" | vd
```