pip install viiew
to quickly view(your_data)
in the terminal!
your_data
can be a
As shown in the GIF, just call view
...
import numpy as np
from viiew import view
x = np.arange(256).reshape(16, 16)
view(x)
...and e.g. press s
to scroll through x
(see all keybindings)!
view
calls view_array
and pressing s
adds 1 to its row0
argument.
Click here, to read about all arguments 📑
view
and view_array
take the arguments
data
: The data object to view (e.g., numpy array, pandas DataFrame, etc.)row0
: Starting row index (default: 0)col0
: Starting column index (default: 0)nrows
: Number of rows to display (default: 20)ncols
: Number of columns to display (default: 10)cidx
: Current column index for sorting (default: None)order
: Sorting order (0: none, 1: ascending, -1: descending) (default: 0)color
: Whether to use color coding for values (default: True)is_table
: Whether to treat the data as a table (auto-detected for pandas DataFrames) (default: None)expand
: Expansion level for columns (default: 0)nchars
: Number of characters per cell (default: 7)end
: String to append after each cell (default: ' ')
w
: Move up one rows
: Move down one rowa
: Move left one columnd
: Move right one columno
: Cycle through sorting orders (ascending, descending, none)t
: Toggle table mode (column-wise colormap)c
: Toggle color displayr
: Decrease number of rowsR
: Increase number of rowsc
: Decrease number of columnsC
: Increase number of columnse
: Decrease column expansionE
: Increase column expansionn
: Decrease number of characters per cellN
: Increase number of characters per cellW
: Move up 10 rowsS
: Move down 10 rowsA
: Move left 10 columnsD
: Move right 10 columnsq
: Quit the viewer