org.saddle

Series

class Series[X, T] extends NumericOps[Series[X, T]] with Serializable

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:

  val s = Series(Vec(1,2,3,4), Index('a','b','b','c'))
  s('a') == Series('a'->1)
  s('b') == Series('b'->2, 'b'->3)

Other ways to slice a series involve implicitly constructing an Slice object and passing it to the Series apply method:

  s('a'->'b') == Series('a'->1, 'b'->2, 'b'->3)
  s(* -> 'b') == Series('a'->1, 'b'->2, 'b'->3)
  s('b' -> *) == Series('b'->2, 'b'->3, 'c'->4)
  s(*) == s

The at method returns an instance of a Scalar, which behaves much like an Option in that it can be either an instance of org.saddle.scalar.NA or a Value case class:

  s.at(0) == Scalar(1)

The slice method allows slicing the Series for locations in [i, j) irrespective of the value of the keys at those locations.

  s.slice(2,4) == Series('b'->3, 'c'->4)

To slice explicitly by labels, use the sliceBy method, which is inclusive of the key boundaries:

  s.sliceBy('b','c') == Series('b'->3, 'c'->4)

The method raw accesses the value directly, which may reveal the underlying representation of a missing value (so be careful).

  s.raw(0) == 1

Series may be used in arithmetic expressions which operate on two Series or on a Series and a scalar value. In the former case, the two Series will automatically align along their indexes. A few examples:

  s * 2 == Series('a'->2, 'b'->4, ... )
  s + s.shift(1) == Series('a'->NA, 'b'->3, 'b'->5, ...)
X

Type of elements in the index, for which there must be an implicit Ordering and ST

T

Type of elements in the values array, for which there must be an implicit ST

Linear Supertypes
Serializable, Serializable, NumericOps[Series[X, T]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Series
  2. Serializable
  3. Serializable
  4. NumericOps
  5. AnyRef
  6. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Series(values: Vec[T], index: Index[X])(implicit arg0: ST[X], arg1: ORD[X], arg2: ST[T])

    values

    Vec backing the values in the Series

    index

    Index backing the keys in the Series

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def %[B, That](other: B)(implicit op: BinOp[Mod, Series[X, T], B, That]): That

    Integer modulus of division

    Integer modulus of division

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance (divisor)

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  5. def &[B, That](other: B)(implicit op: BinOp[BitAnd, Series[X, T], B, That]): That

    Bit-wise AND

    Bit-wise AND

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  6. def &&[B, That](other: B)(implicit op: BinOp[AndOp, Series[X, T], B, That]): That

    Logical AND

    Logical AND

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  7. def *[B, That](other: B)(implicit op: BinOp[Multiply, Series[X, T], B, That]): That

    Multiplication

    Multiplication

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  8. def **[B, That](other: B)(implicit op: BinOp[Power, Series[X, T], B, That]): That

    Exponentiation

    Exponentiation

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance (exponent)

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  9. def +[B, That](other: B)(implicit op: BinOp[Add, Series[X, T], B, That]): That

    Addition

    Addition

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  10. def -[B, That](other: B)(implicit op: BinOp[Subtract, Series[X, T], B, That]): That

    Subtraction

    Subtraction

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  11. def /[B, That](other: B)(implicit op: BinOp[Divide, Series[X, T], B, That]): That

    Division

    Division

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance (divisor)

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  12. def <[B, That](other: B)(implicit op: BinOp[LtOp, Series[X, T], B, That]): That

    Less-than comparison operator

    Less-than comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  13. def <<[B, That](other: B)(implicit op: BinOp[BitShl, Series[X, T], B, That]): That

    Bit-shift left

    Bit-shift left

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  14. def <=[B, That](other: B)(implicit op: BinOp[LteOp, Series[X, T], B, That]): That

    Less-than-or-equal-to comparison operator

    Less-than-or-equal-to comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  15. def <>[B, That](other: B)(implicit op: BinOp[NeqOp, Series[X, T], B, That]): That

    Element-wise inequality operator

    Element-wise inequality operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  16. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  18. def =?[B, That](other: B)(implicit op: BinOp[EqOp, Series[X, T], B, That]): That

    Element-wise equality operator

    Element-wise equality operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  19. def >[B, That](other: B)(implicit op: BinOp[GtOp, Series[X, T], B, That]): That

    Greater-than comparison operator

    Greater-than comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  20. def >=[B, That](other: B)(implicit op: BinOp[GteOp, Series[X, T], B, That]): That

    Greater-than-or-equal-to comparison operator

    Greater-than-or-equal-to comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  21. def >>[B, That](other: B)(implicit op: BinOp[BitShr, Series[X, T], B, That]): That

    Bit-shift right (arithmetic)

    Bit-shift right (arithmetic)

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  22. def >>>[B, That](other: B)(implicit op: BinOp[BitUShr, Series[X, T], B, That]): That

    Bit-shift right (logical)

    Bit-shift right (logical)

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  23. def ^[B, That](other: B)(implicit op: BinOp[BitXor, Series[X, T], B, That]): That

    Bit-wise EXCLUSIVE OR

    Bit-wise EXCLUSIVE OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  24. def align[U](other: Series[X, U], how: JoinType)(implicit arg0: ST[U]): (Series[X, T], Series[X, U])

    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

    Other series to align with

    how

    How to perform the join on the indexes

  25. def apply(slice: Slice[X]): Series[X, T]

    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

    Slice

  26. def apply(keys: X*): Series[X, T]

    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.

    keys

    Sequence of keys

  27. def apply(keys: Array[X]): Series[X, T]

    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.

    keys

    Array of keys

  28. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  29. def at(locs: Int*): Series[X, T]

    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

    locs

    Sequence of Int

  30. def at(locs: Array[Int]): Series[X, T]

    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

    locs

    Array of int offsets into Series

  31. def at(loc: Int): Scalar[T]

    Access a boxed element of a Series at a single location

    Access a boxed element of a Series at a single location

    loc

    offset into Series

  32. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. def concat[U, V](other: Series[X, U])(implicit pro: Promoter[T, U, V], md: ST[V]): Series[X, V]

    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.

    U

    type of other Series Values

    V

    type of resulting Series values

    other

    Series[X, B] to concat

    pro

    Implicit evidence of Promoter[A, B, C]

    md

    Implicit evidence of ST[C]

  34. def contains(key: X): Boolean

    Returns true if the index of the Series contains the key

    Returns true if the index of the Series contains the key

    key

    The key to check

  35. def dot[B, That](other: B)(implicit op: BinOp[InnerProd, Series[X, T], B, That]): That

    Dot (inner) product

    Dot (inner) product

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  36. def dropNA: Series[X, T]

    Creates a Series having the same values but excluding all key/value pairs in which the value is NA.

  37. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. def equals(other: Any): Boolean

    Definition Classes
    Series → AnyRef → Any
  39. def exists(pred: (T) ⇒ Boolean): Boolean

    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

    pred

    Predicate function from T => Boolean

  40. def fillNA(f: (X) ⇒ T): Series[X, T]

    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

    f

    A function X => A to be applied at NA location

  41. def filter(pred: (T) ⇒ Boolean): Series[X, T]

    Return Series whose values satisfy a predicate function

    Return Series whose values satisfy a predicate function

    pred

    Predicate function from T => Boolean

  42. def filterAt(pred: (Int) ⇒ Boolean): Series[X, T]

    Return Series whose offets satisfy a predicate function

    Return Series whose offets satisfy a predicate function

    pred

    Predicate function from Int => Boolean

  43. def filterIx(pred: (X) ⇒ Boolean): Series[X, T]

    Return Series whose index keys satisfy a predicate function

    Return Series whose index keys satisfy a predicate function

    pred

    Predicate function from X => Boolean

  44. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  45. def find(pred: (T) ⇒ Boolean): Vec[Int]

    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.

    pred

    Function from T to Boolean

  46. def findKey(pred: (T) ⇒ Boolean): Index[X]

    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.

    pred

    Function from T to Boolean

  47. def findOne(pred: (T) ⇒ Boolean): Int

    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.

    pred

    Function from T to Boolean

  48. def findOneKey(pred: (T) ⇒ Boolean): Scalar[X]

    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.

    pred

    Function from T to Boolean

  49. def first(key: X): Scalar[T]

    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

    Key on which to match

  50. def first: Scalar[T]

    Get the first value of the Series

  51. def firstKey: Scalar[X]

    Get the first key of the Series

  52. def flatMap[Y, U](f: ((X, T)) ⇒ Traversable[(Y, U)])(implicit arg0: ST[Y], arg1: ORD[Y], arg2: ST[U]): Series[Y, U]

    Map and then flatten over the key-value pairs of the Series, resulting in a new Series.

  53. def get(key: X): Scalar[T]

    Alias for first.

    Alias for first. If a key exists, get the value associated with the first occurence of that key. @return

  54. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  55. def groupBy[Y](ix: Index[Y])(implicit arg0: ST[Y], arg1: ORD[Y]): SeriesGrouper[Y, X, T]

    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.

    Y

    Type of elements of ix

    ix

    Index with which to perform grouping

  56. def groupBy[Y](fn: (X) ⇒ Y)(implicit arg0: ST[Y], arg1: ORD[Y]): SeriesGrouper[Y, X, T]

    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.

    Y

    Type of function codomain

    fn

    Function from X => Y

  57. def groupBy: SeriesGrouper[X, X, T]

    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.

  58. def hasNA: Boolean

    Return true if there is at least one NA value in the Series

  59. def hashCode(): Int

    Definition Classes
    Series → AnyRef → Any
  60. def head(n: Int): Series[X, T]

    Extract at most the first n elements of the Series

    Extract at most the first n elements of the Series

    n

    Number of elements to extract

  61. def hjoin(other: org.saddle.Series[X, _], how: JoinType = LeftJoin): Frame[X, Int, Any]

    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.

    other

    Series to join with

    how

    How to perform the join

  62. def hjoinF(other: org.saddle.Frame[X, _, _], how: JoinType = LeftJoin): Frame[X, Int, Any]

    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.

    other

    Frame[X, Any, Any]

    how

    How to perform the join

  63. val index: Index[X]

    Index backing the keys in the Series

  64. def isEmpty: Boolean

    True if and only if number of elements is zero

  65. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  66. def join(other: Series[X, T], how: JoinType = LeftJoin): Frame[X, Int, T]

    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:

    • Left org.saddle.index.LeftJoin
    • Right org.saddle.index.RightJoin
    • Inner org.saddle.index.InnerJoin
    • Outer org.saddle.index.OuterJoin

    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.

    other

    Series to join with

    how

    How to perform the join

  67. def joinF(other: org.saddle.Frame[X, _, T], how: JoinType = LeftJoin): Frame[X, Int, T]

    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.

    other

    Frame[X, Any, T]

    how

    How to perform the join

  68. def joinMap[U, V](other: Series[X, U], how: JoinType)(f: (T, U) ⇒ V)(implicit arg0: ST[U], arg1: ST[V]): Series[X, V]

    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.

    U

    Type of other series values

    V

    The result type of the function

    other

    Other series

    how

    The type of join to effect

    f

    The function to apply

  69. def keyAt(locs: Int*): Index[X]

    Access a multiple locations of a Series index, returning a new Index

    Access a multiple locations of a Series index, returning a new Index

    locs

    Sequence of int offsets into Index

  70. def keyAt(locs: Array[Int]): Index[X]

    Access a multiple locations of a Series index, returning a new Index

    Access a multiple locations of a Series index, returning a new Index

    locs

    array of int offset into Index

  71. def keyAt(loc: Int): Scalar[X]

    Access a boxed element of a Series index at a single location

    Access a boxed element of a Series index at a single location

    loc

    offset into Series

  72. def last(key: X): Scalar[T]

    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

    Key on which to match

  73. def last: Scalar[T]

    Get the last value of the Series

  74. def lastKey: Scalar[X]

    Get the last key of the Series

  75. def length: Int

    The length shared by both the index and the values array

  76. def map[Y, U](f: ((X, T)) ⇒ (Y, U))(implicit arg0: ST[Y], arg1: ORD[Y], arg2: ST[U]): Series[Y, U]

    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.

    Y

    The type of the resulting index

    U

    The type of the resulting values

    f

    Function from (X,T) to (Y,U)

  77. def mapIndex[Y](fn: (X) ⇒ Y)(implicit arg0: ST[Y], arg1: ORD[Y]): Series[Y, T]

    Map a function over the index, resulting in a new Series

    Map a function over the index, resulting in a new Series

    Y

    Result type of index, ie Index[Y]

    fn

    The function X => Y with which to map

  78. def mapValues[U](f: (T) ⇒ U)(implicit arg0: ST[U]): Series[X, U]

    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.

    U

    The type of the resulting values

    f

    Function from T to U

  79. def mask(f: (T) ⇒ Boolean): Series[X, T]

    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

    f

    Function from T to Boolean

  80. def mask(m: Vec[Boolean]): Series[X, T]

    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

    m

    Mask Vec[Boolean]

  81. def maskIx(f: (X) ⇒ Boolean): Series[X, T]

    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

    f

    Function from X to Boolean

  82. def maxKey(implicit num: NUM[T], ord: ORD[T]): Scalar[X]

    Return key corresponding to maximum value in series

  83. def minKey(implicit num: NUM[T], ord: ORD[T]): Scalar[X]

    Return key corresponding to minimum value in series

  84. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  85. final def notify(): Unit

    Definition Classes
    AnyRef
  86. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  87. def outer[B, That](other: B)(implicit op: BinOp[OuterProd, Series[X, T], B, That]): That

    Outer product

    Outer product

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  88. def pad: Series[X, T]

    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)
    
  89. def padAtMost(n: Int): Series[X, T]

    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)
    
  90. def pivot[O1, O2](implicit split: Splitter[X, O1, O2], ord1: ORD[O1], ord2: ORD[O2], m1: ST[O1], m2: ST[O2]): Frame[O1, O2, T]

    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
    
    O1

    Output row index

    O2

    Output col index

    split

    Implicit evidence of a Splitter for the index

    ord1

    Implicit evidence of an ordering for O1

    ord2

    Implicit evidence of an ordering for O2

    m1

    Implicit evidence of a ST for O1

    m2

    Implicit evidence of a ST for O2

  91. def print(len: Int = 10, stream: OutputStream = System.out): Unit

    Pretty-printer for Series, which simply outputs the result of stringify.

    Pretty-printer for Series, which simply outputs the result of stringify.

    len

    Number of elements to display

  92. def proxyWith(proxy: Series[X, T])(implicit fn: (org.saddle.scalar.NA.type) ⇒ T): Series[X, T]

    Fill series NA's with values using a secondary series

    Fill series NA's with values using a secondary series

    proxy

    The series containing the values to use

  93. def raw(loc: Int): T

    Access an unboxed element of a Series at a single location

    Access an unboxed element of a Series at a single location

    loc

    offset into Series

  94. def reindex(keys: X*): Series[X, T]

    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.

    keys

    Sequence of keys to be the index of the result series

  95. def reindex(newIx: Index[X]): Series[X, T]

    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.

    newIx

    Index of the result series

  96. def resetIndex: Series[Int, T]

    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.

  97. def reversed: Series[X, T]

    Create a new Series whose values and index keys are both in reversed order

  98. def rolling[B](winSz: Int, f: (Series[X, T]) ⇒ B)(implicit arg0: ST[B]): Series[X, B]

    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.

    B

    Result type of function

    winSz

    Window size

    f

    Function Series[X, T] => B to operate on sliding window

  99. def scanLeft[U](init: U)(f: (U, T) ⇒ U)(implicit arg0: ST[U]): Series[X, U]

    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.

    U

    Result type of function

    init

    Initial value of scan

    f

    Function taking (U, T) to U

  100. def setIndex[Y](newIx: Index[Y])(implicit arg0: ST[Y], arg1: ORD[Y]): Series[Y, T]

    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.

    Y

    Type of elements of new Index

    newIx

    A new Index

  101. def shift(n: Int = 1): Series[X, T]

    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.

    n

    Number to shift

  102. def slice(from: Int, until: Int, stride: Int = 1): Series[X, T]

    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.

    from

    Beginning offset

    until

    Ending offset

  103. def sliceBy(rng: Slice[X]): Series[X, T]

    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.

    rng

    An IRange which computes the bound locations

  104. def sliceBy(from: X, to: X, inclusive: Boolean = true): Series[X, T]

    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.

    from

    Beginning offset key

    to

    Ending offset key

  105. def sorted(implicit ev: ORD[T]): Series[X, T]

    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.

    ev

    Implicit evidence of ordering for T

  106. def sortedIx: Series[X, T]

    Create a new Series whose key/value entries are sorted according to the keys (index values).

  107. def splitAt(i: Int): (Series[X, T], Series[X, T])

    Split Series into two series at position i

    Split Series into two series at position i

    i

    Position at which to split Series

  108. def splitBy(k: X): (Series[X, T], Series[X, T])

    Split Series into two series at key x

    Split Series into two series at key x

    k

    Key at which to split Series

  109. def stringify(len: Int = 10): String

  110. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  111. def tail(n: Int): Series[X, T]

    Extract at most the last n elements of the Series

    Extract at most the last n elements of the Series

    n

    number to extract

  112. def take(locs: Array[Int]): Series[X, T]

    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.

    locs

    Array of int offsets

  113. def toSeq: IndexedSeq[(X, T)]

    Convert Series to an indexed sequence of (key, value) pairs.

  114. def toString(): String

    Definition Classes
    Series → AnyRef → Any
  115. def toVec: Vec[T]

    Convert Series to a Vec, by dropping the index.

  116. def unary_-(): Series[X, T]

    Additive inverse of Series with numeric elements

  117. val values: Vec[T]

    Vec backing the values in the Series

  118. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  119. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  120. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  121. def where(pred: org.saddle.Series[_, Boolean]): Series[X, T]

    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.

    pred

    Series[_, Boolean] (or Vec[Boolean] which will implicitly convert)

  122. def xor[B, That](other: B)(implicit op: BinOp[XorOp, Series[X, T], B, That]): That

    Logical EXCLUSIVE OR

    Logical EXCLUSIVE OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  123. def |[B, That](other: B)(implicit op: BinOp[BitOr, Series[X, T], B, That]): That

    Bit-wise OR

    Bit-wise OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  124. def ||[B, That](other: B)(implicit op: BinOp[OrOp, Series[X, T], B, That]): That

    Logical OR

    Logical OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps

Inherited from Serializable

Inherited from Serializable

Inherited from NumericOps[Series[X, T]]

Inherited from AnyRef

Inherited from Any