A Sheet is a representation of some source, usually a Path. A path can be opened, returning a sheet, and/or a sheet can be saved to path.

visidata.vd.openPath(p, filetype=None, create=False)

Call open_<filetype>(p) or openurl_<p.scheme>(p, filetype). Return constructed but unloaded sheet of appropriate type. If True, create will return a new, blank Sheet if file does not exist.

visidata.vd.openSource(p, filetype=None, create=False, **kwargs)

Return unloaded sheet object for p opened as the given filetype and with kwargs as option overrides. p can be a Path or a string (filename, url, or “-” for stdin). when true, create will return a blank sheet, if file does not exist.

visidata.vd.saveSheets(givenpath, *vsheets, confirm_overwrite=False)

Save all vsheets to givenpath.

Sheets API

class visidata.BaseSheet(*names, **kwargs)

Base class for all sheet types.

Name of this sheet.


Number of elements on this sheet.


Return shallow copy of sheet.


Load sheet from self.source. Override in subclass.


Sheets are generally specialized for their rowtype, and TableSheet, used for sheets with rows and columns, is the most common base class. (So common, that it was originally just called Sheet. For clarity, TableSheet is preferred, but Sheet is a valid alias that will never be deprecated.)

class visidata.TableSheet(*names, **kwargs)

Base class for sheets with row objects and column views.


List of row objects on this sheet.


List of all Column objects on this sheet (including hidden columns).


Number of rows on this sheet.


Number of columns on this sheet.


List of non-hidden columns in display order.


Number of visible columns on this sheet.

visidata.TableSheet.addRow(self, row, index=None)

Insert row at index, or append at end of rows if index is None.

visidata.TableSheet.addColumn(self, *cols, index=None)

Insert all cols into columns at index, or append to end of columns if index is None. If index is None, columns are being added by loader, instead of by user. If added by user, mark sheet as modified. Columns added by loader share sheet’s defer status. Columns added by user are not marked as deferred. Return first column.


Generate rows from self.source. Override in subclass.

visidata.TableSheet.rowid(self, row)

Return a unique and stable hash of the row object. Must be fast. Overridable.

visidata.TableSheet.column(self, colname)

Return first column whose name matches colname.

visidata.TableSheet.openRow(sheet, row)

Return Sheet diving into row.

visidata.TableSheet.openCell(sheet, col, row)

Return Sheet diving into cell at row in col.

visidata.TableSheet.gatherBy(self, func, gerund='gathering')

Generate rows for which func(row) returns True, starting from the cursor.

Other Common Sheet Types

These can be used as base classes, or instantiated as they are, or used as templates for rows with similar structure,

class visidata.IndexSheet(*names, **kwargs)

Base class for tabular sheets with rows that are Sheets.

class visidata.TextSheet(*names, **kwargs)

Displays any iterable source, with linewrap if options.wrap is set.

class visidata.SequenceSheet(*names, **kwargs)

Sheets with ColumnItem columns, and rows that are Python sequences (list, namedtuple, etc).

class visidata.PyobjSheet(*names, **kwargs)

Generic Sheet for any Python object. Return specialized subclasses for lists of objects, namedtuples, and dicts.

The Sheet Stack


The “sheet stack”, a list of active sheets (available as the Sheets Sheet via Shift+S). The top sheet, or the displayed sheet, is the first item in the list (vd.sheets[0]).


The top sheet on the sheet stack.

visidata.vd.push(vs, pane=0, load=True)

Push Sheet vs onto vd.sheets stack for pane (0 for active pane, -1 for inactive pane). Remove from other position if already on sheets stack.


Replace top sheet with the given sheet vs.


Remove vs from sheets stack, without asking for confirmation.


Remove sheets from sheets stack, asking for confirmation if needed.


Return Sheet from the sheet stack. sheetname can be a sheet name or a sheet number indexing directly into vd.sheets.