Filters the values of this Column
so that any value for which p
is
true remains a value and all other values are turned into NAs.
Map the values of this Column
to a new Cell.
Returns a column which has had all rows between 0
and len
(exclusive)
forced (evaluated) and stored in memory, while all rows outside of 0
and
len
are set to NA.
Map all values of this Column
using f
.
Returns a column with rows contained in na
masked to NAs.
Returns a copy of this column whose values will be memoized if they are evaluated.
Returns a copy of this column whose values will be memoized if they are
evaluated. That is, if this
column is an *eval* column, then memoizing
it will ensure that, for each row, the value is only computed once,
regardless of the number of times it is accessed.
By default, the memoization is always pessimistic (guaranteed at-most-once
evaluation). If optimistic
is true
, then the memoizing may use an
optimistic update strategy, which means a value *may* be evaluated more
than once if it accessed concurrently.
For dense, empty, and previously-memoized columns, this just returns the column itself.
if true, memoized column may use optimistic updates
Returns a column that will fallback to that
for any row that is NA,
or if the row is NM and the row in that
is a Value, then that
is returned, otherwise NM is returned.
Returns a column that will fallback to that
for any row that is NA,
or if the row is NM and the row in that
is a Value, then that
is returned, otherwise NM is returned. That is, row i
is defined as
this(i) orElse that(i)
, though may be more efficient.
To put the definition in more definite terms:
Value(a) orElse Value(b) == Value(a) Value(a) orElse NA == Value(a) Value(a) orElse NM == Value(a) NA orElse Value(b) == Value(b) NA orElse NA == NA NA orElse NM == NM NM orElse Value(b) == Value(b) NM orElse NM == NM NM orElse NA == NM
the column to fallback on for NA values
Returns a column whose i
-th row maps to row index(i)
in this column.
Returns a column with a single row forced to NA and all others remaining the same.
Shifts all values in the column up by rows
rows.
Shifts all values in the column up by rows
rows. So,
col.shift(n).apply(row) == col(row - n)
. If this is a dense column,
then it will only remain dense if rows
is non-negative.
For each row
in the resulting column, this will return
this(row).zipMap(that(row))
.
For each row
in the resulting column, this will return
this(row).zipMap(that(row))
. Specifically, if this(row)
or that(row)
is NA, then the row is NA, if both sides are values, then the row
is the result of applying f
, otherwise the row is NM.
the column to zip this column with
the function to use to combine 2 values to a single value
Returns the Cell at row row
.
Returns the Cell at row row
.
Iterates from from
until until
, and for each value i
in this range,
it retreives a row via rows(i)
.
Iterates from from
until until
, and for each value i
in this range,
it retreives a row via rows(i)
. If this row is NM
and abortOnNM
is
true
, then iteration stops immediately and false
is returned.
Otherwise, if the row is a value, it calls f
with i
and the value of
the row. If iteration terminates normally (ie. no NMs), then true
is
returned.
This is implemented as a macro and desugars into a while loop that access
the column using apply
if it is a BoxedColumn and
isValueAt
/valueAt
/nonValueAt
if it is an UnboxedColumn. It will
also inline rows
and f
if they are function literals.
the value to start iterating at (inclusive)
the value to stop iterating at (exclusive)
the function used to retrieve the row for an iteration
terminate early if an NM
is found
the function to call at each value
true if no NMs were found (or abortOnNM
is false) and terminate completed successfully, false otherwise
Equivalent to calling foreach(from, until, rows, true)(f)
.
Equivalent to calling foreach(from, until, rows, true)(f)
.