tables::column
template <is_primitive_type P>
class column;
Container of contiguously stored elements of primitive-type P. Supports column-oriented operations.
Member types
Member type | Definition |
---|---|
prim_t |
The primitive-type used by vector_t |
std::vector<prim_t> |
|
column_t |
The column type |
impl::column_impl<prim_t> |
|
std::shared_ptr<column_impl_t> |
Member functions
Capacity
Member type | Definition |
---|---|
Returns number of elements in column |
|
xre:column_n_nones.adoc[n_nones()] |
Returns number of nones in column |
Accessors
Member type | Definition |
---|---|
v() |
Returns underlying vector_t |
impl() |
Returns underlying column_impl_t |
_v() |
Returns underlying vector_t |
_impl() |
Returns underlying column_impl_t |
Elements
Member type | Definition |
---|---|
Returns element at index i |
|
Returns column with values copied from provided indices. |
|
Returns column containing first n elements |
|
Returns column with first n elements dropped. |
|
Returns column containing last n elements |
|
Returns column with last n elements dropped. |
Append
Member type | Definition |
---|---|
Returns column with element or column appended to the end. |
|
Appends element to column. |
Transform
Member type | Allowed primitive-types | Definition |
---|---|---|
Any |
Returns column containing all items except items in xs |
|
Any |
Returns column with elements f(v(i)) |
|
Any |
Returns column with elements casted to P1 |
|
Any |
Returns column with elements reversed |
|
Any |
Returns column with nones replaced with provided or existing value. |
|
Any |
Returns column with elements replaced from provided column except for nones. |
|
Any |
Returns column with unique items in order of first occurrence. |
|
Any |
Returns a column(bool_t) showing where consecutive items differ. |
|
Any |
Returns column containing sorted items in ascending / descending order. |
|
Any |
Returns column containing the cumulative minimums,maximums |
|
Any |
Returns column_t containing the moving minimum/maximum of the last m items. |
|
Any |
Returns column_t containing next/prev items in the list. |
|
Arithmetic |
Returns column with differences of each item with its predecessor. |
|
Arithmetic |
Returns column containing elements rounded down to the nearest multiple of val |
|
Arithmetic |
Returns column_t containing the cumulative sum, or moving sums. |
Aggregate
Member type | Allowed primitive-types | Definition |
---|---|---|
Any |
Returns minimum/maximum element |
|
Any |
Returns true if all elements are true (for booleans) or non-zero (for other types) |
|
Any |
Returns true if any element is true (for booleans) or non-zero (for other types) |
|
Arithmetic |
Returns the arithmetic mean. |
|
Arithmetic |
Returns dot product. |
|
Arithmetic |
Returns euclidean norm |
Operations
Member type | Allowed primitive-types | Definition |
---|---|---|
std::string_view |
Returns column-of-bools indicating if strings starts/ends with the given prefix/suffix. |
|
std::string_view |
Returns column with given substrings. |
|
std::string_view |
Return column with concatenation of strings. |
|
std::string_view |
Concatenates all strings into one string. |
Others
Member type | Allowed primitive-types | Definition |
---|---|---|
Any |
Returns all possible combinations of two columns |
Comparison
Member type | Allowed primitive-types | Definition |
---|---|---|
Any |
Column-wise equality/inequality comparison. |
|
Any |
Column-wise less-than/less-or-equal comparison. |
|
Any |
Column-wise greater-than/greater-or-equal comparison. |