Class Dataframe<K>
java.lang.Object
ubic.gemma.core.loader.util.anndata.Dataframe<K>
- Type Parameters:
K- the type of index being used
- All Implemented Interfaces:
AutoCloseable,Iterable<Dataframe.Column<K,?>>
Represents an AnnData dataframe.
- Author:
- poirigui
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getArrayColumn(String columnName) Obtain an array column as a H5 dataset.getCategoricalColumn(String columnName) Obtain a categorical column.<T> CategoricalArray<T> getCategoricalColumn(String columnName, Class<T> categoryType) Obtain a categorical column.Obtain a column, the element type is guessed as pergetColumnType(String)<T> Dataframe.Column<K, T> Obtain a column of the given element type.getColumnEncodingType(String columnName) Obtain the encoding type of a column.Obtain all the columns defined in the dataframe.Class<?> getColumnType(String columnName) Guess the type of a given column.getIndex()Obtain the index column.<T> Dataframe.Column<T, T> Obtain the index column.Obtain the name of the column used as an index.Boolean[]getNullableBooleanArrayColumn(String columnName) Obtain a nullable boolean array column.Integer[]getNullableIntegerArrayColumn(String columnName) Obtain a nullable integer array column.String[]getStringArrayColumn(String columnName) Obtain a string-array column.iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Dataframe
Create a new dataframe from an H5 group.- Parameters:
group- an H5 group that contains a datasetindexClass- the type of index to use, or null to ignore. If left unset, indexing will not be possible viaDataframe.Column.get(Object).
-
-
Method Details
-
getIndexColumn
Obtain the name of the column used as an index. -
getColumns
Obtain all the columns defined in the dataframe.Unsupported encoding types are ignored.
-
getColumnEncodingType
Obtain the encoding type of a column.This is usually one of
string-array,categoricalorarray, but many other encodings are possible. -
getIndex
Obtain the index column. -
getIndex
Obtain the index column. -
getColumnType
Guess the type of a given column. -
getColumn
Obtain a column, the element type is guessed as pergetColumnType(String)- See Also:
-
getColumn
Obtain a column of the given element type. -
getArrayColumn
Obtain an array column as a H5 dataset. -
getCategoricalColumn
Obtain a categorical column. -
getCategoricalColumn
Obtain a categorical column. -
getStringArrayColumn
Obtain a string-array column. -
getNullableIntegerArrayColumn
Obtain a nullable integer array column. -
getNullableBooleanArrayColumn
Obtain a nullable boolean array column. -
iterator
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-