deephaven.pandas

This module supports the conversion between Deephaven tables and Pandas DataFrames.

to_pandas(table, cols=None)[source]

Produces a pandas.DataFrame from a table.

Note that the entire table is going to be cloned into memory, so the total number of entries in the table should be considered before blindly doing this. For large tables, consider using the Deephaven query language to select a subset of the table before using this method.

Parameters
  • table (Table) – the source table

  • cols (List[str]) – the source column names, default is None which means include all columns

Return type

DataFrame

Returns

pandas.DataFrame

Raises

DHError

to_table(df, cols=None)[source]

Creates a new table from a pandas.DataFrame.

Parameters
  • df (DataFrame) – the Pandas DataFrame instance

  • cols (List[str]) – the dataframe column names, default is None which means including all columns in the dataframe

Return type

Table

Returns

a Deephaven table

Raises

DHError