<<

<<(row_or_array) Instance Public methods Adds a new row to the bottom end of this table. You can provide an Array, which will be converted to a CSV::Row (inheriting the table's headers()), or a CSV::Row. This method returns the table for chaining.

==

==(other) Instance Public methods Returns true if all rows of this table ==() other's rows.

[]

[](index_or_header) Instance Public methods In the default mixed mode, this method returns rows for index access and columns for header access. You can force the index association by first calling #by_col!() or #by_row!(). Columns are returned as an Array of values. Altering that Array has no effect on the table.

[]=

[]=(index_or_header, value) Instance Public methods In the default mixed mode, this method assigns rows for index access and columns for header access. You can force the index association by first calling #by_col!() or #by_row!(). Rows may be set to an Array of values (which will inherit the table's headers()) or a CSV::Row. Columns may be set to a single value, which is copied to each row of the column, or an Array of values. Arrays of values are assigned to rows top to bottom i

by_col

by_col() Instance Public methods Returns a duplicate table object, in column mode. This is handy for chaining in a single call without changing the table mode, but be aware that this method can consume a fair amount of memory for bigger data sets. This method returns the duplicate table for chaining. Don't chain destructive methods (like []=()) this way though, since you are working with a duplicate.

by_col!

by_col!() Instance Public methods Switches the mode of this table to column mode. All calls to indexing and iteration methods will work with columns until the mode is changed again. This method returns the table and is safe to chain.

by_col_or_row

by_col_or_row() Instance Public methods Returns a duplicate table object, in mixed mode. This is handy for chaining in a single call without changing the table mode, but be aware that this method can consume a fair amount of memory for bigger data sets. This method returns the duplicate table for chaining. Don't chain destructive methods (like []=()) this way though, since you are working with a duplicate.

by_col_or_row!

by_col_or_row!() Instance Public methods Switches the mode of this table to mixed mode. All calls to indexing and iteration methods will use the default intelligent indexing system until the mode is changed again. In mixed mode an index is assumed to be a row reference while anything else is assumed to be column access by headers. This method returns the table and is safe to chain.

by_row

by_row() Instance Public methods Returns a duplicate table object, in row mode. This is handy for chaining in a single call without changing the table mode, but be aware that this method can consume a fair amount of memory for bigger data sets. This method returns the duplicate table for chaining. Don't chain destructive methods (like []=()) this way though, since you are working with a duplicate.

by_row!

by_row!() Instance Public methods Switches the mode of this table to row mode. All calls to indexing and iteration methods will work with rows until the mode is changed again. This method returns the table and is safe to chain.