V
- the type of valuespublic class DefaultDataFrame<V> extends AbstractDataFrame<Integer,String,V> implements MutableDataFrame<Integer,String,V>
Constructor and Description |
---|
DefaultDataFrame(DataFrame dataFrame) |
DefaultDataFrame(Index<Integer> rowIndex,
DefaultIndex<String> columnIndex,
MutableSeries<Integer,V>[] series) |
DefaultDataFrame(String[] names,
Class[] classes,
V[][] data) |
DefaultDataFrame(TableModel tableModel) |
Modifier and Type | Method and Description |
---|---|
DataFrame<String,Integer,?> |
append(Series<String,?> series) |
Iterable<String> |
columns()
Returns the column keys.
|
Series<Integer,V> |
getColumn(String column)
Returns a series of all the values of a given column.
|
int |
getColumnAddress(String column)
Returns the absolute index for the specified column key.
|
Class |
getColumnClass(String column)
Returns the most specific superclass for all cell values in a column
|
int |
getColumnCount()
Returns the number of columns contained by this data frame.
|
DefaultIndex<String> |
getColumnIndex()
Gets the index used to access the columns.
|
String |
getColumnKey(int index)
Returns the column key at the specified absolute index.
|
Series<String,?> |
getRow(Integer row)
Returns a series of all the values of a given row.
|
int |
getRowAddress(Integer row)
Returns the absolute index for the specified row key.
|
Class |
getRowClass(Integer row)
Returns the most specific superclass for all cell values in a row.
|
int |
getRowCount()
Returns the number of rows contained by the this data frame.
|
Index<Integer> |
getRowIndex()
Gets the index used to access the rows.
|
Integer |
getRowKey(int index)
Returns the row key at the specified absolute index.
|
V |
getValueAt(Integer row,
String column)
Returns the value for the cell at the intersection of the
column key and row key. |
DataFrame |
join(Series series,
String[] columns) |
DataFrame<MultiKey,String,V> |
reindexRows(String... columns)
Returns a new data frame reindexed using the values coming from the specified columns.
|
DefaultDataFrame<V> |
removeColumns(String... columns) |
Iterable<Integer> |
rows()
Returns the row keys.
|
void |
setValueAt(Integer row,
String column,
V value)
Sets the value for the cell at the intersection of the
column key and row key. |
addDataFrameListener, addWeakDataFrameListener, aggregate, benchmark, filter, getColumnName, getCount, getCountDistinct, getCube, getMax, getMean, getMin, getStdDev, getSum, getVariance, getVariance, notifyDataFrameChanged, orderRows, print, print, removeDataFrameListener, removeDataFrameListeners
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDataFrameListener, addWeakDataFrameListener, aggregate, benchmark, filter, getColumnName, getCount, getCountDistinct, getMax, getMean, getMin, getStdDev, getSum, getVariance, getVariance, orderRows, print, print, removeDataFrameListener, removeDataFrameListeners
public DefaultDataFrame(TableModel tableModel)
public DefaultDataFrame(DataFrame dataFrame)
public DefaultDataFrame(Index<Integer> rowIndex, DefaultIndex<String> columnIndex, MutableSeries<Integer,V>[] series)
public DefaultIndex<String> getColumnIndex()
DataFrame
getColumnIndex
in interface DataFrame<Integer,String,V>
public Index<Integer> getRowIndex()
DataFrame
getRowIndex
in interface DataFrame<Integer,String,V>
public Iterable<String> columns()
DataFrame
public Class getRowClass(Integer row)
DataFrame
getRowClass
in interface DataFrame<Integer,String,V>
row
- the key of the rowpublic Class getColumnClass(String column)
DataFrame
getColumnClass
in interface DataFrame<Integer,String,V>
column
- the key of the columnpublic Series<String,?> getRow(Integer row)
DataFrame
public Series<Integer,V> getColumn(String column)
DataFrame
public V getValueAt(Integer row, String column)
DataFrame
column
key and row
key.getValueAt
in interface DataFrame<Integer,String,V>
row
- the row key whose value is to be queriedcolumn
- the column key whose value is to be queriedpublic void setValueAt(Integer row, String column, V value)
MutableDataFrame
column
key and row
key.setValueAt
in interface MutableDataFrame<Integer,String,V>
row
- the row key whose value is to be changedcolumn
- the column key whose value is to be changedvalue
- the new value at the specified cellpublic Iterable<Integer> rows()
DataFrame
public Integer getRowKey(int index)
DataFrame
DataFrame.getRowAddress(Object)
.public String getColumnKey(int index)
DataFrame
DataFrame.getColumnAddress(Object)
.getColumnKey
in interface DataFrame<Integer,String,V>
getColumnKey
in class AbstractDataFrame<Integer,String,V>
index
- the indexpublic int getRowAddress(Integer row)
DataFrame
DataFrame.getRowKey(int)
.getRowAddress
in interface DataFrame<Integer,String,V>
getRowAddress
in class AbstractDataFrame<Integer,String,V>
row
- the row keypublic int getColumnAddress(String column)
DataFrame
DataFrame.getColumnKey(int)
.getColumnAddress
in interface DataFrame<Integer,String,V>
getColumnAddress
in class AbstractDataFrame<Integer,String,V>
column
- the column keypublic int getRowCount()
DataFrame
getRowCount
in interface DataFrame<Integer,String,V>
getRowCount
in class AbstractDataFrame<Integer,String,V>
public int getColumnCount()
DataFrame
getColumnCount
in interface DataFrame<Integer,String,V>
getColumnCount
in class AbstractDataFrame<Integer,String,V>
public DataFrame<MultiKey,String,V> reindexRows(String... columns)
DataFrame
reindexRows
in interface DataFrame<Integer,String,V>
reindexRows
in class AbstractDataFrame<Integer,String,V>
columns
- the columns to use for the label valuespublic DefaultDataFrame<V> removeColumns(String... columns)
Copyright © 2014 Macrofocus GmbH. All Rights Reserved.