Skip to main content

Class DataFrameUtils

class gpudb_dataframe.DataFrameUtils
classmethod sql_to_df(db: GPUdb, sql: str, sql_params: list = [], batch_size: int = 5000, sql_opts: dict = , show_progress: bool = False) DataFrame | None

Create a pd.Dataframe from the results of a SQL query.

Parameters

Raises

Returns

classmethod table_to_df(db: GPUdb, table_name: str, batch_size: int = 5000, show_progress: bool = False) DataFrame | None

Convert a Kinetica table into a pd.Dataframe and load data into it.

Parameters

Returns

classmethod table_type_as_df(gpudb_table: GPUdbTable) DataFrame

Convert the type schema (column list) of a GPUdbTable into a pd.Dataframe.

Parameters

Returns

classmethod df_to_table(df: DataFrame, db: GPUdb, table_name: str, column_types: dict = , clear_table: bool = False, create_table: bool = True, load_data: bool = True, show_progress: bool = False, batch_size: int = 5000, **kwargs) GPUdbTable

Load a pd.Dataframe into a table; optionally dropping any existing table, creating it if it doesn’t exist, and loading data into it; and then returning a GPUdbTable reference to the table.

Parameters

Raises

Returns

classmethod df_insert_into_table(df: DataFrame, gpudb_table: GPUdbTable, batch_size: int = 5000, show_progress: bool = False) int

Load a Pandas pd.Dataframe into a GPUdbTable.

Parameters

Raises

Returns