deephaven.column¶
This module implements the Column class and functions that work with Columns.
- class Column(name, data_type, component_type=None, column_type=NORMAL)[source]¶
Bases:
ColumnDefinitionA Column object represents a column definition in a Deephaven Table. Deprecated for removal next release, prefer col_def.
Deprecated for removal next release, prefer col_def.
- property column_type¶
The column type.
- property component_type¶
The column component type.
- property data_type¶
The column data type.
- j_object_type¶
alias of
ColumnDefinition
- property name¶
The column name.
- class ColumnDefinition(j_column_definition)[source]¶
Bases:
JObjectWrapperA Deephaven column definition.
- j_object_type¶
alias of
ColumnDefinition
- class ColumnType(*values)[source]¶
Bases:
Enum- NORMAL = io.deephaven.engine.table.ColumnDefinition$ColumnType(objectRef=0x3af6410a)¶
A regular column.
- PARTITIONING = io.deephaven.engine.table.ColumnDefinition$ColumnType(objectRef=0x3af64112)¶
A partitioning column.
- class InputColumn(name, data_type, component_type=None, column_type=NORMAL, input_data=None)[source]¶
Bases:
objectAn InputColumn represents a user defined column with some input data.
Creates an InputColumn. :param name: the column name :type name:
str:param data_type: the column data type :type data_type:DType:param component_type: the column component type, None by default :type component_type:DType|None:param column_type: the column type, NORMAL by default :type column_type:ColumnType:param input_data: the input data, by default is None :type input_data:Any|None- Returns:
a new InputColumn
- Raises:
DHError –
- bool_col(name, data)[source]¶
Creates an input column containing Boolean data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of compatible data, e.g. list, tuple, numpy array, Pandas series, etc.
- Return type:
- Returns:
a new input column
- byte_col(name, data)[source]¶
Creates an input column containing primitive byte data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of compatible data, e.g. list, tuple, numpy array, Pandas series, etc.
- Return type:
- Returns:
a new input column
- char_col(name, data)[source]¶
Creates an input column containing primitive char data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of compatible data, e.g. list, tuple, numpy array, Pandas series, etc.
- Return type:
- Returns:
a new input column
- col_def(name, data_type, component_type=None, column_type=NORMAL)[source]¶
Creates a ColumnDefinition.
- Parameters:
name (
str) – the column namedata_type (
DType) – the column data typecomponent_type (
DType|None) – the column component type, None by defaultcolumn_type (
ColumnType) – the column type, ColumnType.NORMAL by default
- Return type:
- Returns:
a new ColumnDefinition
- Raises:
DHError –
- datetime_col(name, data)[source]¶
Creates an input column containing Deephaven Datetime instances.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of Datetime instances or values that can be converted to Datetime instances (e.g. Instant, int nanoseconds since the Epoch, str, datetime.datetime, numpy.datetime64, pandas.Timestamp).
- Return type:
- Returns:
a new input column
- double_col(name, data)[source]¶
Creates an input column containing primitive double data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of compatible data, e.g. list, tuple, numpy array, Pandas series, etc.
- Return type:
- Returns:
a new input column
- float_col(name, data)[source]¶
Creates an input column containing primitive float data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of compatible data, e.g. list, tuple, numpy array, Pandas series, etc.
- Return type:
- Returns:
a new input column
- int_col(name, data)[source]¶
Creates an input column containing primitive int data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of compatible data, e.g. list, tuple, numpy array, Pandas series, etc.
- Return type:
- Returns:
a new input column
- jobj_col(name, data)[source]¶
Creates an input column containing Java objects.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of Java objects
- Return type:
- Returns:
a new input column
- long_col(name, data)[source]¶
Creates an input column containing primitive long data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a python sequence of compatible data, could be numpy array or Pandas series
- Return type:
- Returns:
a new input column
- pyobj_col(name, data)[source]¶
Creates an input column containing complex, non-primitive-like Python objects.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of Python objects
- Return type:
- Returns:
a new input column
- short_col(name, data)[source]¶
Creates an input column containing primitive short data.
- Parameters:
name (
str) – the column namedata (
Sequence) – a sequence of compatible data, e.g. list, tuple, numpy array, Pandas series, etc.
- Return type:
- Returns:
a new input column