Integer modulus of division
Integer modulus of division
type of the other operand
result type of operation
other operand instance (divisor)
implicit evidence for operation between this and other
Bit-wise AND
Bit-wise AND
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Logical AND
Logical AND
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Multiplication
Multiplication
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Exponentiation
Exponentiation
type of the other operand
result type of operation
other operand instance (exponent)
implicit evidence for operation between this and other
Addition
Addition
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Subtraction
Subtraction
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Division
Division
type of the other operand
result type of operation
other operand instance (divisor)
implicit evidence for operation between this and other
Less-than comparison operator
Less-than comparison operator
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Bit-shift left
Bit-shift left
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Less-than-or-equal-to comparison operator
Less-than-or-equal-to comparison operator
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Element-wise inequality operator
Element-wise inequality operator
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Element-wise equality operator
Element-wise equality operator
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Greater-than comparison operator
Greater-than comparison operator
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Greater-than-or-equal-to comparison operator
Greater-than-or-equal-to comparison operator
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Bit-shift right (arithmetic)
Bit-shift right (arithmetic)
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Bit-shift right (logical)
Bit-shift right (logical)
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Bit-wise EXCLUSIVE OR
Bit-wise EXCLUSIVE OR
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Aligns this series with another series, returning the two series aligned to each others indexes according to the the provided parameter
Aligns this series with another series, returning the two series aligned to each others indexes according to the the provided parameter
Other series to align with
How to perform the join on the indexes
Extract a Series whose keys respect the Slice provided.
Extract a Series whose keys respect the Slice provided. Returns a new Series whose key-value pairs maintain the original ordering.
Slice
Extract a Series corresponding to those keys provided.
Extract a Series corresponding to those keys provided. Returns a new Series whose key-value pairs maintain the original ordering.
Sequence of keys
Extract a Series corresponding to those keys provided.
Extract a Series corresponding to those keys provided. Returns a new Series whose key-value pairs maintain the original ordering.
Array of keys
Access multiple locations of a Series, returning a new Series comprising those locations
Access multiple locations of a Series, returning a new Series comprising those locations
Sequence of Int
Access multiple locations of a Series, returning a new Series comprising those locations
Access multiple locations of a Series, returning a new Series comprising those locations
Array of int offsets into Series
Access a boxed element of a Series at a single location
Access a boxed element of a Series at a single location
offset into Series
Concatenate two Series instances together whose indexes share the same type of element, and where there exists some way to join the values of the Series.
Concatenate two Series instances together whose indexes share the same type of
element, and where there exists some way to join the values of the Series. For
instance, Series[X, Double] concat
Series[X, Int] will promote Int to Double as
a result of the implicit existence of a Promoter[Double, Int, Double] instance.
The result Index will simply be the concatenation of the two input Indexes.
type of other Series Values
type of resulting Series values
Series[X, B] to concat
Implicit evidence of Promoter[A, B, C]
Implicit evidence of ST[C]
Returns true if the index of the Series contains the key
Returns true if the index of the Series contains the key
The key to check
Dot (inner) product
Dot (inner) product
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Creates a Series having the same values but excluding all key/value pairs in which the value is NA.
Return true if there exists some element of the Series which satisfies the predicate function
Return true if there exists some element of the Series which satisfies the predicate function
Predicate function from T => Boolean
Fills NA values in series with result of a function which acts on the index of the particular NA value found
Fills NA values in series with result of a function which acts on the index of the particular NA value found
A function X => A to be applied at NA location
Return Series whose values satisfy a predicate function
Return Series whose values satisfy a predicate function
Predicate function from T => Boolean
Return Series whose offets satisfy a predicate function
Return Series whose offets satisfy a predicate function
Predicate function from Int => Boolean
Return Series whose index keys satisfy a predicate function
Return Series whose index keys satisfy a predicate function
Predicate function from X => Boolean
Search for the int offsets where the values of the Series satisfy a predicate function.
Search for the int offsets where the values of the Series satisfy a predicate function.
Function from T to Boolean
Search for the keys of the Series index whose corresponding values satisfy a predicate function.
Search for the keys of the Series index whose corresponding values satisfy a predicate function.
Function from T to Boolean
Find the first int offset (or -1 if none) where a value of the Series satisfies a predicate function.
Find the first int offset (or -1 if none) where a value of the Series satisfies a predicate function.
Function from T to Boolean
Find the first key (or NA if none) where a value of the Series satisfies a predicate function.
Find the first key (or NA if none) where a value of the Series satisfies a predicate function.
Function from T to Boolean
Get the first value of the Series whose key matches that provided
Get the first value of the Series whose key matches that provided
Key on which to match
Get the first value of the Series
Get the first key of the Series
Map and then flatten over the key-value pairs of the Series, resulting in a new Series.
Alias for first
.
Alias for first
. If a key exists, get the value associated with the first
occurence of that key.
@return
Construct a SeriesGrouper with which further computations, such as combine or transform, may be performed.
Construct a SeriesGrouper with which further computations, such as combine or transform, may be performed. The groups are constructed from the keys of the provided index, with each unique key corresponding to a group.
Type of elements of ix
Index with which to perform grouping
Construct a SeriesGrouper with which further computations, such as combine or transform, may be performed.
Construct a SeriesGrouper with which further computations, such as combine or transform, may be performed. The groups are constructed from the result of the function applied to the keys of the Index; each unique result of calling the function on elements of the Index corresponds to a group.
Type of function codomain
Function from X => Y
Construct a SeriesGrouper with which further computations, such as combine or transform, may be performed.
Construct a SeriesGrouper with which further computations, such as combine or transform, may be performed. The groups are constructed from the keys of the index, with each unique key corresponding to a group.
Return true if there is at least one NA value in the Series
Extract at most the first n elements of the Series
Extract at most the first n elements of the Series
Number of elements to extract
Perform a (heterogeneous) join with another Series[X, _] according to its index.
Perform a (heterogeneous) join with another Series[X, _] according to its index. The values of the other Series do not need to have the same type. The result is a Frame whose index is the result of the join, and whose column index is {0, 1}, and whose values are sourced from the original Series.
Series to join with
How to perform the join
Perform a (heterogeneous) join with a Frame[X, _, _] according to its row index.
Perform a (heterogeneous) join with a Frame[X, _, _] according to its row index. The values of the other Frame do not need to have the same type. The result is a Frame whose row index is the result of the join, and whose column index is [0, N), corresponding to the number of columns of the frame plus 1, and whose values are sourced from the original Series and Frame.
Frame[X, Any, Any]
How to perform the join
Index backing the keys in the Series
True if and only if number of elements is zero
Perform a join with another Series[X, T] according to its index.
Perform a join with another Series[X, T] according to its index. The how
argument dictates how the join is to be performed:
The result is a Frame whose index is the result of the join, and whose column index is {0, 1}, and whose values are sourced from the original Series.
Series to join with
How to perform the join
Perform a join with a Frame[X, _, T] according to its row index.
Perform a join with a Frame[X, _, T] according to its row index. The values of the other Frame must have the same type as the Series. The result is a Frame whose row index is the result of the join, and whose column index is [0, N), corresponding to the number of columns of the frame plus 1, and whose values are sourced from the original Series and Frame.
Frame[X, Any, T]
How to perform the join
Join two series on their index and apply a function to each paired value; when either value is NA, the result of the function is forced to be NA.
Join two series on their index and apply a function to each paired value; when either value is NA, the result of the function is forced to be NA.
Type of other series values
The result type of the function
Other series
The type of join to effect
The function to apply
Access a multiple locations of a Series index, returning a new Index
Access a multiple locations of a Series index, returning a new Index
Sequence of int offsets into Index
Access a multiple locations of a Series index, returning a new Index
Access a multiple locations of a Series index, returning a new Index
array of int offset into Index
Access a boxed element of a Series index at a single location
Access a boxed element of a Series index at a single location
offset into Series
Get the last value of the Series whose key matches that provided
Get the last value of the Series whose key matches that provided
Key on which to match
Get the last value of the Series
Get the last key of the Series
The length shared by both the index and the values array
Map over the key-value pairs of the Series, resulting in a new Series.
Map over the key-value pairs of the Series, resulting in a new Series. Applies a function to each pair of values in the series.
The type of the resulting index
The type of the resulting values
Function from (X,T) to (Y,U)
Map a function over the index, resulting in a new Series
Map a function over the index, resulting in a new Series
Result type of index, ie Index[Y]
The function X => Y with which to map
Map over the values of the Series, resulting in a new Series.
Map over the values of the Series, resulting in a new Series. Applies a function to each (non-na) value in the series, returning a new series whose index remains the same.
The type of the resulting values
Function from T to U
Create a new Series that, whenever the mask predicate function evaluates to true on a value, is masked with NA
Create a new Series that, whenever the mask predicate function evaluates to true on a value, is masked with NA
Function from T to Boolean
Create a new Series that, wherever the mask Vec is true, is masked with NA
Create a new Series that, wherever the mask Vec is true, is masked with NA
Mask Vec[Boolean]
Create a new Series that, whenever the mask predicate function evaluates to true on a key, is masked with NA
Create a new Series that, whenever the mask predicate function evaluates to true on a key, is masked with NA
Function from X to Boolean
Return key corresponding to maximum value in series
Return key corresponding to minimum value in series
Outer product
Outer product
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Replaces all NA values for which there is a non-NA value at a prior offset with the corresponding most-recent, non-NA value.
Replaces all NA values for which there is a non-NA value at a prior offset with the corresponding most-recent, non-NA value. E.g,
Series(1, 2, NA, 3, NA).pad == Series(1, 2, 2, 3, 3) Series(NA, 1, 2, NA).pad == Series(NA, 1, 2, 2)
Same as above, but limits the amount of padding to N observations.
Same as above, but limits the amount of padding to N observations.
Series(1, 2, NA, NA, 3).padAtMost(1) == Series(1, 2, 2, NA, 3)
Pivot splits an index of tuple keys of arity N into a row index having arity N-1 and a column index, producing a 2D Frame whose values are from the original Series as indexed by the corresponding keys.
Pivot splits an index of tuple keys of arity N into a row index having arity N-1 and a column index, producing a 2D Frame whose values are from the original Series as indexed by the corresponding keys.
To recover the original Series, the melt method of Frame may be used.
For example, given:
Series(Vec(1,2,3,4), Index(('a',1),('a',2),('b',1),('b',2))) res0: org.saddle.Series[(Char, Int),Int] = [4 x 1] a 1 => 1 2 => 2 b 1 => 3 2 => 4
the pivot command does the following:
res0.pivot res1: org.saddle.Frame[Char,Int,Int] = [2 x 2] 1 2 -- -- a => 1 2 b => 3 4
Output row index
Output col index
Implicit evidence of a Splitter for the index
Implicit evidence of an ordering for O1
Implicit evidence of an ordering for O2
Implicit evidence of a ST for O1
Implicit evidence of a ST for O2
Pretty-printer for Series, which simply outputs the result of stringify.
Pretty-printer for Series, which simply outputs the result of stringify.
Number of elements to display
Fill series NA's with values using a secondary series
Fill series NA's with values using a secondary series
The series containing the values to use
Access an unboxed element of a Series at a single location
Access an unboxed element of a Series at a single location
offset into Series
Create a new Series whose index formed of the provided argument, and whose values are derived from the original Series.
Create a new Series whose index formed of the provided argument, and whose values are derived from the original Series.
Sequence of keys to be the index of the result series
Create a new Series whose index is the provided argument, and whose values are derived from the original Series.
Create a new Series whose index is the provided argument, and whose values are derived from the original Series.
Index of the result series
Create a new Series whose values are the same, but whose Index has been changed to the bound [0, length - 1), as in an array.
Create a new Series whose values and index keys are both in reversed order
Produce a Series whose values are the result of executing a function on a sliding window of the data.
Produce a Series whose values are the result of executing a function on a sliding window of the data.
Result type of function
Window size
Function Series[X, T] => B to operate on sliding window
Left scan over the values of the Series, as in scala collections library, but with the resulting series having the same index.
Left scan over the values of the Series, as in scala collections library, but with the resulting series having the same index. Note, differs from standard left scan because initial value is not retained in result.
Result type of function
Initial value of scan
Function taking (U, T) to U
Create a new Series using the current values but with the new index.
Create a new Series using the current values but with the new index. Positions of the values do not change.
Type of elements of new Index
A new Index
Shift the sequence of values relative to the index by some offset, dropping those values which no longer associate with a key, and having those keys which no longer associate to a value instead map to NA.
Shift the sequence of values relative to the index by some offset, dropping those values which no longer associate with a key, and having those keys which no longer associate to a value instead map to NA.
Number to shift
Creates a view into original Series from one int offset until (exclusive) another offset.
Creates a view into original Series from one int offset until (exclusive) another offset. Data is not copied.
Beginning offset
Ending offset
Creates a view into original Series from one key through another key as specified in the bound argument.
Creates a view into original Series from one key through another key as specified in the bound argument. Data is not copied. Series index must be sorted.
An IRange which computes the bound locations
Creates a view into original Series from one key up to (inclusive by default) another key.
Creates a view into original Series from one key up to (inclusive by default) another key. Data is not copied. Series index must be sorted.
Beginning offset key
Ending offset key
Create a new Series whose key/value entries are sorted according to the values of the Series.
Create a new Series whose key/value entries are sorted according to the values of the Series.
Implicit evidence of ordering for T
Create a new Series whose key/value entries are sorted according to the keys (index values).
Split Series into two series at position i
Split Series into two series at position i
Position at which to split Series
Split Series into two series at key x
Split Series into two series at key x
Key at which to split Series
Extract at most the last n elements of the Series
Extract at most the last n elements of the Series
number to extract
Given int offets to take, form a new series from the keys and values found at those offsets.
Given int offets to take, form a new series from the keys and values found at those offsets.
Array of int offsets
Convert Series to an indexed sequence of (key, value) pairs.
Convert Series to a Vec, by dropping the index.
Additive inverse of Series with numeric elements
Vec backing the values in the Series
Return Series whose keys and values are chosen via a Vec[Boolean] or a Series[_, Boolean] where the latter contains a true value.
Return Series whose keys and values are chosen via a Vec[Boolean] or a Series[_, Boolean] where the latter contains a true value.
Series[_, Boolean] (or Vec[Boolean] which will implicitly convert)
Logical EXCLUSIVE OR
Logical EXCLUSIVE OR
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Bit-wise OR
Bit-wise OR
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Logical OR
Logical OR
type of the other operand
result type of operation
other operand instance
implicit evidence for operation between this and other
Series
is an immutable container for 1D homogeneous data which is indexed by a an associated sequence of keys.Both the index and value data are backed by arrays.
Series
is effectively an associative map whose keys have an ordering provided by the natural (provided) order of the backing array.Several element access methods are provided.
The
apply
method returns a slice of the original Series:Other ways to slice a series involve implicitly constructing an Slice object and passing it to the Series apply method:
The
at
method returns an instance of a Scalar, which behaves much like anOption
in that it can be either an instance of org.saddle.scalar.NA or a Value case class:The
slice
method allows slicing the Series for locations in [i, j) irrespective of the value of the keys at those locations.To slice explicitly by labels, use the
sliceBy
method, which is inclusive of the key boundaries:The method
raw
accesses the value directly, which may reveal the underlying representation of a missing value (so be careful).Series
may be used in arithmetic expressions which operate on twoSeries
or on aSeries
and a scalar value. In the former case, the two Series will automatically align along their indexes. A few examples:Type of elements in the index, for which there must be an implicit Ordering and ST
Type of elements in the values array, for which there must be an implicit ST