Documentation ¶
Overview ¶
Package row defines row primitives that are used to construct a Frame.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnIndexer ¶
type ColumnIndexer struct {
// contains filtered or unexported fields
}
ColumnIndexer indexes the given column names using the default indexing behavior of NewIndex. If a column does not exist for a given row, then the column indexer fails. The indexer keeps track of the types associated with each column, and fails if the underlying type changes for a given column.
TODO: ColumnIndexer is currently not threadsafe.
func NewColumnIndexer ¶
func NewColumnIndexer(columns ...string) *ColumnIndexer
NewColumnIndexer returns a ColumnIndexer for the given columns.
type Data ¶
type Data map[string]interface{}
Data maps column names to column values for a given row.
type Index ¶
type Index interface { // Less returns true if the index is less than the given Index or Row object. // If the argument is an Index, then it must be the same underlying type. If // the argument is a Row, then it must be indexed by an Index object with the // same underlying type. Less(item btree.Item) bool }
Index compares rows.
type MultiIndex ¶
type MultiIndex struct {
// contains filtered or unexported fields
}
MultiIndex compares rows via a dictionary comparison on multiple Index objects.
func NewMultiIndex ¶
func NewMultiIndex(indices ...Index) MultiIndex
NewMultiIndex returns a MultiIndex for the given indices.
func (MultiIndex) Less ¶
func (m MultiIndex) Less(item btree.Item) bool
Less returns true if the index is less than the given MultiIndex object, or if it is less than the given Row object indexed by a MultiIndex. Comparision is performed in index order. For example, given MultiIndex objects ["a", "b"], ["a", "c"], the first index is less than the second index. A MultiIndex with fewer constituent indices is less than a MultiIndex that agrees on all existing values. For example, ["a"] is less than ["a", "b"].
func (MultiIndex) String ¶
func (m MultiIndex) String() string
String formats the MultiIndex as a string.
type NullIndex ¶
type NullIndex struct{}
NullIndex represents a missing index. It is considered less than any other index.
type Row ¶
type Row struct { // Index contains the index for the row. Index Index // Data contains the columns of data for the row. Data Data }
Row represents a single entry in a Frame.