Trait/Object

framian

Frame

Related Docs: object Frame | package framian

Permalink

trait Frame[Row, Col] extends AnyRef

Source
Frame.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Frame
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def colIndex: Index[Col]

    Permalink

    The column keys' index.

  2. abstract def columnsAsSeries: Series[Col, UntypedColumn]

    Permalink

    A column-oriented view of this frame.

    A column-oriented view of this frame. Largely used internally.

  3. abstract def isColOriented: Boolean

    Permalink

    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.

  4. abstract def isRowOriented: Boolean

    Permalink

    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.

  5. abstract def rowIndex: Index[Row]

    Permalink

    The row keys' index.

  6. abstract def rowsAsSeries: Series[Row, UntypedColumn]

    Permalink

    A row-oriented view of this frame.

    A row-oriented view of this frame. Largely used internally.

  7. abstract def transpose: Frame[Col, Row]

    Permalink

    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.

  8. abstract def withColIndex[C1](index: Index[C1]): Frame[Row, C1]

    Permalink

    Replaces the column index with index.

  9. abstract def withRowIndex[R1](index: Index[R1]): Frame[R1, Col]

    Permalink

    Replaces the row index with index.

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to any2stringadd[Frame[Row, Col]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Frame[Row, Col], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to ArrowAssoc[Frame[Row, Col]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def appendCols(that: Frame[Row, Col]): Frame[Row, Col]

    Permalink

    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.

  7. def appendRows(that: Frame[Row, Col]): Frame[Row, Col]

    Permalink

    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.

  8. def apply[A](rowKey: Row, colKey: Col)(implicit arg0: ColumnTyper[A]): Cell[A]

    Permalink

    Returns the value of the cell at row rowKey and column colKey as the type A.

    Returns the value of the cell at row rowKey and column colKey as the type A. If the value doesn't exist, then NA is returned. If the value is not meaningful as an instance of A, then NM is returned.

  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. implicit def colClassTag: ClassTag[Col]

    Permalink
  12. def colKeys: Set[Col]

    Permalink

    Returns the set of all unique column keys.

  13. implicit def colOrder: Order[Col]

    Permalink
  14. def cols: Int

    Permalink

    Returns the number of cols in this frame.

  15. def column[T](col: Col)(implicit arg0: ColumnTyper[T]): Series[Row, T]

    Permalink

    Returns a single column from this Frame cast to type T.

  16. def dropColumns(cols: Col*): Frame[Row, Col]

    Permalink

    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.

  17. def dropRows(rows: Row*): Frame[Row, Col]

    Permalink

    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.

  18. def ensuring(cond: (Frame[Row, Col]) ⇒ Boolean, msg: ⇒ Any): Frame[Row, Col]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to Ensuring[Frame[Row, Col]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (Frame[Row, Col]) ⇒ Boolean): Frame[Row, Col]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to Ensuring[Frame[Row, Col]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean, msg: ⇒ Any): Frame[Row, Col]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to Ensuring[Frame[Row, Col]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean): Frame[Row, Col]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to Ensuring[Frame[Row, Col]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    Frame → AnyRef → Any
  24. def filter[A](rows: Rows[Row, A])(p: (A) ⇒ Boolean): Frame[Row, Col]

    Permalink

    Filter this frame using rows extract values and the predicate p.

    Filter this frame using rows extract values and the predicate p. If, for a given column, p is false, then that column will be removed from the frame. Any NA and NM columns will also be removed.

  25. def filter[A](cols: Cols[Col, A])(p: (A) ⇒ Boolean): Frame[Row, Col]

    Permalink

    Filter this frame using cols extract values and the predicate p.

    Filter this frame using cols extract values and the predicate p. If, for a given row, p is false, then that row will be removed from the frame. Any NA and NM rows will also be removed.

  26. def filterColKeys(p: (Col) ⇒ Boolean): Frame[Row, Col]

    Permalink

    Removes rows whose row key is true for the predicate p.

  27. def filterRowKeys(p: (Row) ⇒ Boolean): Frame[Row, Col]

    Permalink

    Removes rows whose row key is true for the predicate p.

  28. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to StringFormat[Frame[Row, Col]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  30. def get[A](cols: Cols[Col, A]): Series[Row, A]

    Permalink

    Extract values from the rows of the series using cols and returns them in a Series.

  31. def get[A](rows: Rows[Row, A]): Series[Col, A]

    Permalink

    Extract values from the columns of the series using rows and returns them in a Series.

  32. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  33. def getCol(key: Col): Option[Rec[Row]]

    Permalink
  34. def getColumnGroup(col: Col): Frame[Row, Col]

    Permalink
  35. def getRow(key: Row): Option[Rec[Col]]

    Permalink
  36. def getRowGroup(row: Row): Frame[Row, Col]

    Permalink
  37. def group[A](rows: Rows[Row, A])(implicit arg0: Order[A], arg1: ClassTag[A]): Frame[Row, A]

    Permalink

    This "groups" the frame cols using the Rows extractor to determine the group for each column.

    This "groups" the frame cols using the Rows extractor to determine the group for each column. Each column is then re-keyed using its group.

    This is equivalent to, but more efficient than, frame.sortBy(rows).reindex(rows).

  38. def group[A](cols: Cols[Col, A])(implicit arg0: Order[A], arg1: ClassTag[A]): Frame[A, Col]

    Permalink

    This "groups" the frame rows using the Cols extractor to determine the group for each row.

    This "groups" the frame rows using the Cols extractor to determine the group for each row. Each row is then re-keyed using its group.

    This is equivalent to, but more efficient than, frame.sortBy(cols).reindex(cols).

  39. def hashCode(): Int

    Permalink
    Definition Classes
    Frame → AnyRef → Any
  40. def isEmpty: Boolean

    Permalink

    Returns true if this frame is logically empty.

    Returns true if this frame is logically empty. A frame is logically empty if none of its rows or columns contain a value, though they may contain NAs or NMs.

    TODO: I think an NM should also count as a "value".

  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. def join[L <: HList](them: L)(join: Join)(implicit folder: SeriesJoinFolder[L, Row, Col]): Frame[Row, Col]

    Permalink
  43. def join[T](col: Col, that: Series[Row, T])(joinStrategy: Join)(implicit arg0: ClassTag[T]): Frame[Row, Col]

    Permalink
  44. def join(that: Frame[Row, Col])(joinStrategy: Join): Frame[Row, Col]

    Permalink
  45. def map[A, B](cols: Cols[Col, A], to: Col)(f: (A) ⇒ B)(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    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).

  46. def map[A, B](rows: Rows[Row, A], to: Row)(f: (A) ⇒ B)(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    Extracts a row from this frame using Rows, then merges it back into this frame as the row to.

    Extracts a row from this frame using Rows, then merges it back into this frame as 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.

  47. def mapColKeys[C](f: (Col) ⇒ C)(implicit arg0: Order[C], arg1: ClassTag[C]): Frame[Row, C]

    Permalink

    Map the column index using f.

    Map the column index using f. This retains the traversal order of the columns.

  48. def mapRowGroups[R1, C1](f: (Row, Frame[Row, Col]) ⇒ Frame[R1, C1])(implicit arg0: ClassTag[R1], arg1: Order[R1], arg2: ClassTag[C1], arg3: Order[C1]): Frame[R1, C1]

    Permalink
  49. def mapRowKeys[R](f: (Row) ⇒ R)(implicit arg0: Order[R], arg1: ClassTag[R]): Frame[R, Col]

    Permalink

    Map the row index using f.

    Map the row index using f. This retains the traversal order of the rows.

  50. def mapWithIndex[A, B](cols: Cols[Col, A], to: Col)(f: (Row, A) ⇒ B)(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    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.

  51. def mapWithIndex[A, B](rows: Rows[Row, A], to: Row)(f: (Col, A) ⇒ B)(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    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.

  52. def merge[L <: HList](them: L)(merge: Merge)(implicit folder: SeriesMergeFolder[L, Row, Col]): Frame[Row, Col]

    Permalink
  53. def merge[T](col: Col, that: Series[Row, T])(mergeStrategy: Merge)(implicit arg0: ClassTag[T]): Frame[Row, Col]

    Permalink
  54. def merge(that: Frame[Row, Col])(mergeStrategy: Merge): Frame[Row, Col]

    Permalink
  55. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  56. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  57. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  58. def reduce[A, B](rows: Rows[Row, A], to: Row)(reducer: Reducer[A, B])(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    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&gt; val f = Frame.fromColumns("a" :: 2 :: HNil, "b" :: 3 :: HNil)
    scala&gt; f.reduce(Cols(1).as[Int], 1)(reduce.Sum)
    res0: framian.Frame[Int,Int] =
        0 . 1
    0 : a | b
    1 : 5 | 5
  59. def reduce[A, B](cols: Cols[Col, A], to: Col)(reducer: Reducer[A, B])(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    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&gt; val f = Frame.fromRows("a" :: 2 :: HNil, "b" :: 3 :: HNil)
    scala&gt; f.reduce(Cols(1).as[Int], 1)(reduce.Sum)
    res0: Frame[Int, Int] =
        0 . 1
    0 : a | 5
    1 : b | 5
  60. def reduceByKey[A, B](rows: Rows[Row, A], to: Row)(reducer: Reducer[A, B])(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    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.

  61. def reduceByKey[A, B](cols: Cols[Col, A], to: Col)(reducer: Reducer[A, B])(implicit arg0: ClassTag[B]): Frame[Row, Col]

    Permalink

    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.

  62. def reduceFrame[V, R](reducer: Reducer[V, R])(implicit arg0: ColumnTyper[V], arg1: ClassTag[R], arg2: ColumnTyper[R]): Series[Col, R]

    Permalink

    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.

  63. def reduceFrameByKey[V, R](reducer: Reducer[V, R])(implicit arg0: ColumnTyper[V], arg1: ClassTag[R], arg2: ColumnTyper[R]): Frame[Row, Col]

    Permalink
  64. def reduceFrameWithCol[A, B, C](col: Col)(reducer: Reducer[(A, B), C])(implicit arg0: ColumnTyper[A], arg1: ColumnTyper[B], arg2: ClassTag[C]): Series[Col, C]

    Permalink
  65. def reindex[A](rows: Rows[Row, A])(implicit arg0: Order[A], arg1: ClassTag[A]): Frame[Row, A]

    Permalink

    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 NAs or NMs 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 })
  66. def reindex[A](cols: Cols[Col, A])(implicit arg0: Order[A], arg1: ClassTag[A]): Frame[A, Col]

    Permalink

    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 NAs or NMs 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 })
  67. def retainColumns(cols: Col*): Frame[Row, Col]

    Permalink

    Retain only the cols in cols, dropping all others.

  68. def retainRows(rows: Row*): Frame[Row, Col]

    Permalink

    Retain only the rows in rows, dropping all others.

  69. def reverseColumns: Frame[Row, Col]

    Permalink

    Reverse the traversal order of the columns in this frame.

  70. def reverseRows: Frame[Row, Col]

    Permalink

    Reverse the traversal order of the rows in this frame.

  71. def row[T](row: Row)(implicit arg0: ColumnTyper[T]): Series[Col, T]

    Permalink

    Returns a single row from this Frame cast to type T.

  72. implicit def rowClassTag: ClassTag[Row]

    Permalink
  73. def rowKeys: Set[Row]

    Permalink

    Returns the set of all unique row keys.

  74. implicit def rowOrder: Order[Row]

    Permalink
  75. def rows: Int

    Permalink

    Returns the number of rows in this frame.

  76. def sortBy[A](cols: Cols[Col, A])(implicit arg0: Order[A]): Frame[Row, Col]

    Permalink

    Sorts the frame using the order for the Cols provided.

    Sorts the frame using the order for the Cols provided. This will only ever permute the rows of the frame and will not remove/add anything.

    cols

    The row value extractor to get the sort key

  77. def sortBy[A](rows: Rows[Row, A])(implicit arg0: Order[A]): Frame[Row, Col]

    Permalink

    Sorts the frame using the order for the Rows provided.

    Sorts the frame using the order for the Rows provided. This will only ever permute the cols of the frame and will not remove/add anything.

    rows

    The column value extractor to get the sort key

  78. def sortColumns: Frame[Row, Col]

    Permalink

    Put the columns in sorted order.

    Put the columns in sorted order. This affects only the traversal order of the columns.

  79. def sortRows: Frame[Row, Col]

    Permalink

    Put the rows in sorted order.

    Put the rows in sorted order. This affects only the traversal order of the rows.

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

    Permalink
    Definition Classes
    AnyRef
  81. def toString(): String

    Permalink
    Definition Classes
    Frame → AnyRef → Any
  82. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  85. def [B](y: B): (Frame[Row, Col], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Frame[Row, Col] to ArrowAssoc[Frame[Row, Col]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Frame[Row, Col] to any2stringadd[Frame[Row, Col]]

Inherited by implicit conversion StringFormat from Frame[Row, Col] to StringFormat[Frame[Row, Col]]

Inherited by implicit conversion Ensuring from Frame[Row, Col] to Ensuring[Frame[Row, Col]]

Inherited by implicit conversion ArrowAssoc from Frame[Row, Col] to ArrowAssoc[Frame[Row, Col]]

Ungrouped