Appends the columns in that
to the end of the columns in this
.
Appends the columns in that
to the end of the columns in this
. This
will force the rows into sorted order.
Appends the rows in that
to the end of the rows in this
.
Appends the rows in that
to the end of the rows in this
. This will
force the columns into sorted order.
Returns the value of the cell at row rowKey
and column colKey
as the
type A
.
The column keys' index.
The column keys' index.
Returns the set of all unique column keys.
Returns the set of all unique column keys.
Returns the number of cols in this frame.
Returns the number of cols in this frame.
Returns a single column from this Frame
cast to type T
.
Returns a single column from this Frame
cast to type T
.
A column-oriented view of this frame.
A column-oriented view of this frame. Largely used internally.
Drop the columns cols
from the column index.
Drop the columns cols
from the column index. This simply removes the
columns from the column index and does not modify the actual columns.
Drop the rows rows
from the row index.
Drop the rows rows
from the row index. This simply removes the rows
from the index and does not modify the actual columns.
Filter this frame using rows
extract values and the predicate p
.
Filter this frame using cols
extract values and the predicate p
.
Removes rows whose row key is true for the predicate p
.
Removes rows whose row key is true for the predicate p
.
Removes rows whose row key is true for the predicate p
.
Removes rows whose row key is true for the predicate p
.
Extract values from the rows of the series using cols
and returns them
in a Series.
Extract values from the columns of the series using rows
and returns
them in a Series.
This "groups" the frame cols using the Rows extractor to determine the group for each column.
This "groups" the frame rows using the Cols extractor to determine the group for each row.
Returns true
if this frame can be treated as column oriented.
Returns true
if this frame can be treated as column oriented. This is
largely for optimization purposes.
Returns true
if this frame is logically empty.
Returns true
if this frame can be treated as row oriented.
Returns true
if this frame can be treated as row oriented. This is
largely for optimization purposes.
Extracts a column from this frame using Cols, then merges it back into
this frame as the column to
.
Extracts a column from this frame using Cols, then merges it back into
this frame as the column to
. If to
doesn't exist then a new column
will be appended onto the frame, otherwise the columns(s) with key to
will be removed first.
This is equivalent to, but may be more efficient than
frame.merge(to, frame.get(cols))(Merge.Outer)
.
Extracts a row from this frame using Rows, then merges it back into
this frame as the row to
.
Map the column index using f
.
Map the column index using f
. This retains the traversal order of the
columns.
Map the row index using f
.
Map the row index using f
. This retains the traversal order of the rows.
Maps each column to a value using cols
, then maps the result with the row
key using f
and stores it in the column to
.
Maps each column to a value using cols
, then maps the result with the row
key using f
and stores it in the column to
. If to
doesn't exist
then a new column will be appended onto the frame, otherwise the
columns(s) with key to
will be removed first.
Maps each row to a value using rows
, then maps the result with the
column key using f
and stores it in the row to
.
Maps each row to a value using rows
, then maps the result with the
column key using f
and stores it in the row to
. If to
doesn't exist
then a new row will be appended onto the frame, otherwise the row(s) with
key to
will be removed first.
Reduces this frame using rows
and joins the result back into the frame.
Reduces this frame using rows
and joins the result back into the frame.
This doesn't remove any columns from the frame; the reduced result is
duplicated for each column. This will replace the to
row if it exists,
otherwise it creates a new row to
at the end.
scala> val f = Frame.fromColumns("a" :: 2 :: HNil, "b" :: 3 :: HNil) scala> f.reduce(Cols(1).as[Int], 1)(reduce.Sum) res0: framian.Frame[Int,Int] = 0 . 1 0 : a | b 1 : 5 | 5
Reduces this frame using cols
and joins the result back into the frame.
Reduces this frame using cols
and joins the result back into the frame.
This doesn't remove any rows from the frame; the reduced result is
duplicated for each row. This will replace the to
column if it exists,
otherwise it creates a new column to
at the end.
scala> val f = Frame.fromRows("a" :: 2 :: HNil, "b" :: 3 :: HNil) scala> f.reduce(Cols(1).as[Int], 1)(reduce.Sum) res0: Frame[Int, Int] = 0 . 1 0 : a | 5 1 : b | 5
Reduces this frame, by column key groups, using rows
and joins the
result back into the frame.
Reduces this frame, by column key groups, using rows
and joins the
result back into the frame. Within each column key group, the reduced
result is duplicated for each column. If to
exists it will be replaced,
otherwise it will be added to the end of the rows.
Reduces this frame, by row key groups, using cols
and joins the result
back into the frame.
Reduces this frame, by row key groups, using cols
and joins the result
back into the frame. Within each row key group, the reduced result is
duplicated for each row. If to
exists it will be replaced, otherwise it
will be added to the end of the columns.
The following methods allow a user to apply reducers directly across a frame.
The following methods allow a user to apply reducers directly across a frame. In particular, this API demands that we specify the type that the reducer accepts and it will only apply it in the case that there exists a type conversion for a given column.
Re-indexes the frame using the extractor rows
to define the new row
keys.
Re-indexes the frame using the extractor rows
to define the new row
keys. This will not re-order the frame cols, just replace the keys. This
will drop any columns where rows
extracts a NonValue.
To retain NA
s or NM
s in the index, you'll need to recover your
Rows with some other value. For example,
frame.reindex(rows.map(Value(_)).recover { case nonValue => nonValue })
Re-indexes the frame using the extractor cols
to define the new row
keys.
Re-indexes the frame using the extractor cols
to define the new row
keys. This will not re-order the frame rows, just replace the keys. This
will drop any rows where cols
extracts a NonValue.
To retain NA
s or NM
s in the index, you'll need to recover your
Cols with some other value. For example,
frame.reindex(cols.map(Value(_)).recover { case nonValue => nonValue })
Retain only the cols in cols
, dropping all others.
Retain only the cols in cols
, dropping all others.
Retain only the rows in rows
, dropping all others.
Retain only the rows in rows
, dropping all others.
Reverse the traversal order of the columns in this frame.
Reverse the traversal order of the columns in this frame.
Reverse the traversal order of the rows in this frame.
Reverse the traversal order of the rows in this frame.
Returns a single row from this Frame
cast to type T
.
Returns a single row from this Frame
cast to type T
.
The row keys' index.
The row keys' index.
Returns the set of all unique row keys.
Returns the set of all unique row keys.
Returns the number of rows in this frame.
Returns the number of rows in this frame.
A row-oriented view of this frame.
A row-oriented view of this frame. Largely used internally.
Sorts the frame using the order for the Cols provided.
Sorts the frame using the order for the Rows provided.
Put the columns in sorted order.
Put the columns in sorted order. This affects only the traversal order of the columns.
Put the rows in sorted order.
Put the rows in sorted order. This affects only the traversal order of the rows.
Transposes the rows and columns of this frame.
Transposes the rows and columns of this frame. All rows in this frame becomes the columns of the new frame.
Replaces the column index with index
.
Replaces the column index with index
.
Replaces the row index with index
.
Replaces the row index with index
.