Class IndexedDataFrame<R,​V>

  • Type Parameters:
    R - the type of row keys
    V - the type of column keys
    All Implemented Interfaces:
    DataFrame<R,​java.lang.Object,​V>

    public class IndexedDataFrame<R,​V>
    extends AbstractDataFrame<R,​java.lang.Object,​V>
    An indexed data frame.
    • Constructor Detail

      • IndexedDataFrame

        public IndexedDataFrame​(Series<R,​V>... series)
    • Method Detail

      • getColumnIndex

        public UniqueIndex<java.lang.Object> getColumnIndex()
        Description copied from interface: DataFrame
        Gets the index used to access the columns.
        Returns:
        the column index
      • getRowIndex

        public UniqueIndex<R> getRowIndex()
        Description copied from interface: DataFrame
        Gets the index used to access the rows.
        Returns:
        the row index
      • getRowClass

        public java.lang.Class getRowClass​(R row)
        Description copied from interface: DataFrame
        Returns the most specific superclass for all cell values in a row.
        Parameters:
        row - the key of the row
        Returns:
        the common ancestor class of the object values in the row.
      • getColumnClass

        public java.lang.Class getColumnClass​(java.lang.Object column)
        Description copied from interface: DataFrame
        Returns the most specific superclass for all cell values in a column
        Parameters:
        column - the key of the column
        Returns:
        the common ancestor class of the object values in the column.
      • getRow

        public Series<java.lang.Object,​?> getRow​(java.lang.Object row)
        Description copied from interface: DataFrame
        Returns a series of all the values of a given row.
        Parameters:
        row - the row key
        Returns:
        a Series object
      • getColumn

        public Series<R,​V> getColumn​(java.lang.Object column)
        Description copied from interface: DataFrame
        Returns a series of all the values of a given column.
        Specified by:
        getColumn in interface DataFrame<R,​java.lang.Object,​V>
        Overrides:
        getColumn in class AbstractDataFrame<R,​java.lang.Object,​V>
        Parameters:
        column - the row key
        Returns:
        a Series object
      • getValueAt

        public V getValueAt​(R row,
                            java.lang.Object column)
        Description copied from interface: DataFrame
        Returns the value for the cell at the intersection of the column key and row key.
        Parameters:
        row - the row key whose value is to be queried
        column - the column key whose value is to be queried
        Returns:
        the value Object at the specified cell
      • rows

        public java.lang.Iterable<R> rows()
        Description copied from interface: DataFrame
        Returns the row keys.
        Specified by:
        rows in interface DataFrame<R,​java.lang.Object,​V>
        Overrides:
        rows in class AbstractDataFrame<R,​java.lang.Object,​V>
        Returns:
        the row keys
      • columns

        public java.lang.Iterable<java.lang.Object> columns()
        Description copied from interface: DataFrame
        Returns the column keys.
        Specified by:
        columns in interface DataFrame<R,​java.lang.Object,​V>
        Overrides:
        columns in class AbstractDataFrame<R,​java.lang.Object,​V>
        Returns:
        the column keys
      • getRowCount

        public int getRowCount()
        Description copied from interface: DataFrame
        Returns the number of rows contained by the this data frame.
        Specified by:
        getRowCount in interface DataFrame<R,​java.lang.Object,​V>
        Overrides:
        getRowCount in class AbstractDataFrame<R,​java.lang.Object,​V>
        Returns:
        the number of rows.
      • getColumnCount

        public int getColumnCount()
        Description copied from interface: DataFrame
        Returns the number of columns contained by this data frame.
        Specified by:
        getColumnCount in interface DataFrame<R,​java.lang.Object,​V>
        Overrides:
        getColumnCount in class AbstractDataFrame<R,​java.lang.Object,​V>
        Returns:
        the number of columns.
      • reindexRows

        public DataFrame<MultiKey,​java.lang.Object,​V> reindexRows​(java.lang.Object... rows)
        Description copied from interface: DataFrame
        Returns a new data frame reindexed using the values coming from the specified rows.
        Specified by:
        reindexRows in interface DataFrame<R,​java.lang.Object,​V>
        Overrides:
        reindexRows in class AbstractDataFrame<R,​java.lang.Object,​V>
        Parameters:
        rows - the columns to use for the label values
        Returns:
        the reindexed data frame.
      • join

        public DataFrame join​(Series series,
                              java.lang.Object[] columns)