Skip to content

Pandas-like Backend Base Classes

These base classes underlie the pandas-based backends.

BasePandasBackend (BaseBackend)

Base class for backends based on pandas.


current_database property readonly

Return the name of the current database.

Backends that don't support different databases will return None.


str | None Name of the current database.

version: str property readonly

Return the version of the backend engine.

For database servers, return the server version.

For others such as SQLite and pandas return the version of the underlying library or application.


str The backend version


Options (BaseModel) pydantic-model

enable_trace: bool pydantic-field

Enable tracing for execution.


compile(self, expr, *args, **kwargs)

Compile an expression.

create_table(self, table_name, obj=None, schema=None)

Create a table.

database(self, name=None)

Return a Database object for the name database.

DEPRECATED: database is deprecated; use equivalent methods in the backend


name Name of the database to return the object for.


Database A database object for the specified database.

from_dataframe(self, df, name='df', client=None)

Construct an ibis table from a pandas DataFrame.


df A pandas DataFrame name The name of the pandas DataFrame client Client dictionary will be mutated with the name of the DataFrame, if not provided a new client is created


Table A table expression

has_operation(operation) classmethod

Return whether the backend implements support for operation.


operation A class corresponding to an operation.


bool Whether the backend implements the operation.


import ibis import ibis.expr.operations as ops ibis.sqlite.has_operation(ops.ArrayIndex) False ibis.postgres.has_operation(ops.ArrayIndex) True

list_databases(self, like=None)

List existing databases in the current connection.


like A pattern in Python's regex format to filter returned database names.


list[str] The database names that exist in the current connection, that match the like pattern if provided.

list_tables(self, like=None, database=None)

Return the list of table names in the current database.

For some backends, the tables may be files in a directory, or other equivalent entities in a SQL database.


like : str, optional A pattern in Python's regex format. database : str, optional The database to list tables of, if not the current one.


list[str] The list of the table names that match the pattern like.

table(self, name, schema=None)

Return a table expression from the database.

DEPRECATED: table is deprecated as of v2.0; change the current database before calling .table()

Last update: March 1, 2022