tables::table

template <typename... Ts>
requires ( is_key_value_pairs<Ts...> )
class table;

Container of column(s). Container is a compile-time associative map of lookup-types, to column<Pi>.

Member types.

Member type Definition

ts_t

Tuple of lookup-types representing columns.

ps_t

Tuple of primitive-types.

zs_t

Tuple of (lookup-type,primitive-type) pairs.

table_t

Table type

cols_t

mtuple of (Ii,column<Pi>).

row_t

row of (Ii,Pi).

add_t<T>

Table type obtained by adding lookup-type to table_t

select_t<Ts>

Table type obtained by selecting lookup-type(s) from table_t

Member functions

Constructors / Assignment

Member type Definition

Constructors

Constructos the table.

Assignment operator

Assigns values to the table.

Capacity

Member type Definition

ncols/nrows

Returns number of columns/rows in table.

Accessors

Member type Definition

col/_col

Returns underlying column

_set_row

Assign values to row in table.

Elements

Member type Definition

at

Returns table with the rows at given indices.

irow

Returns the row at given row index.

take

Returns table containing first n rows.

drop

Returns table with first n rows dropped.

rtake

Returns table containing last n rows.

rdrop

Returns table with last n rows dropped.

Append

Member type Definition

append

Returns table with appended rows or table.

_append

Append row to existing table.

Select, add, and remove columns

Member type Definition

select

Returns table with selected columns

remove

Returns table with columns removed.

add

Returns table with columns added.

addu

Returns table with columns added or updated if lookup-type already exists.

Update

Member type Definition

update

Update selected columns

update_at

Update selected columns at given rows.

updatef

Update selected columns ignoring nones.

Grouping

Member type Definition

key_by

Returns a ktable.

group_by

Returns gtable.

fby

Returns ftable.

Joins

Member type Definition

uj

Returns table resulting from a union join.

lj and ljf

Returns table resulting from a left join.

ij and ijf

Returns table resulting from an inner join.

aj and aj0

Returns table resulting from an asof join.

Transform

Member type Definition

except

Returns table containing all items except specified rows.

reverse

Returns table with columns reversed.

fills,fill_with,zfill

Returns table with nones replaced.

deltas

Returns table with column replaced with differences of each item with its predecessor.

differ

Returns column of bool_t: true if consecutive rows differ, otherwise false.

distinct

Returns table with unique rows in order of first occurrence.

sort

Returns a sorted table in ascending order.

sort_by

Returns a sorted table in ascending order using values in specified column(s).

rsort_by

Returns a sorted table in descending order using values in specified column(s).

Aggregate

Member type Definition

min,max

Returns minimum/maximum rows.

sum

Returns the summation of rows.

avg

Returns the arithmetic mean.

Comparison

Member type Definition

eq,ne

Returns table containing element-wise equality/inequality comparison between two tables.

lt,le

Returns table containing element-wise less-than/less-or-equal comparison between two tables.

gt,ge

Returns table containing element-wise greater-than/greater-or-equal comparison between two tables.