Table

A small, column-oriented table.

Usage

Source

Table(data)

Parameters

data: Mapping[str, Sequence[Any]]
A dictionary mapping column names to sequences of values. All columns must have the same length.

Examples

Create a table from a dictionary of columns. In a notebook, or on a page like this one, a table displays as HTML:

from tinytab import Table

tbl = Table({"item": ["coffee", "bagel"], "price": [3.5, 2.25]})
tbl
itemprice
coffee3.5
bagel2.25