to_table
The to_table method creates a new table from a pandas.DataFrame.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| df | pandas.DataFrame | The |
| cols optional | list[str] | The columns to convert. If not specified, all columns are converted. |
| infer_objects optional | bool | Whether to infer the best possible types for columns of the generic |
Returns
A Deephaven Table.
Examples
The following example uses pandas to create a DataFrame, then converts it to a Deephaven Table with to_table.
The following example uses the cols parameter to convert only the specified columns.
The following example creates a DataFrame with a generic Object type column. It then converts it to a table twice: once with infer_objects=True and once with infer_objects=False. The metadata for each resulting table is shown to demonstrate the difference in column types.