View Source Kino.DataTable (Kino v0.12.3)
A kino for interactively viewing tabular data.
examples
Examples
data = [
%{id: 1, name: "Elixir", website: "https://elixir-lang.org"},
%{id: 2, name: "Erlang", website: "https://www.erlang.org"}
]
Kino.DataTable.new(data)
The tabular view allows you to quickly preview the data and analyze it thanks to sorting capabilities.
data =
for pid <- Process.list() do
pid |> Process.info() |> Keyword.merge(registered_name: nil)
end
Kino.DataTable.new(
data,
keys: [:registered_name, :initial_call, :reductions, :stack_size]
)
Link to this section Summary
Functions
Creates a new kino displaying given tabular data.
Link to this section Types
@type t() :: Kino.Table.t()
Link to this section Functions
@spec new( Table.Reader.t(), keyword() ) :: t()
Creates a new kino displaying given tabular data.
options
Options
:keys
- a list of keys to include in the table for each record. The order is reflected in the rendered table. Optional:name
- The displayed name of the table. Defaults to"Data"
:sorting_enabled
- whether the table should support sorting the data. Sorting requires traversal of the whole enumerable, so it may not be desirable for large lazy enumerables. Defaults totrue