diff --git a/ibis/backends/pandas/__init__.py b/ibis/backends/pandas/__init__.py index 7239b2af26ed..fe92cb8cba0a 100644 --- a/ibis/backends/pandas/__init__.py +++ b/ibis/backends/pandas/__init__.py @@ -33,14 +33,14 @@ class Options(ibis.config.Config): def do_connect( self, - dictionary: MutableMapping[str, pd.DataFrame], + dictionary: MutableMapping[str, pd.DataFrame] | None = None, ) -> None: """Construct a client from a dictionary of pandas DataFrames. Parameters ---------- dictionary - Mutable mapping of string table names to pandas DataFrames. + An optional mapping of string table names to pandas DataFrames. Examples -------- @@ -51,7 +51,7 @@ def do_connect( # register dispatchers from ibis.backends.pandas import execution, udf # noqa: F401 - self.dictionary = dictionary + self.dictionary = dictionary or {} self.schemas: MutableMapping[str, sch.Schema] = {} def from_dataframe( diff --git a/ibis/backends/pandas/tests/test_client.py b/ibis/backends/pandas/tests/test_client.py index d5267cf72cc4..067163555c9a 100644 --- a/ibis/backends/pandas/tests/test_client.py +++ b/ibis/backends/pandas/tests/test_client.py @@ -29,6 +29,11 @@ def test_data(): return test_data +def test_connect_no_args(): + con = ibis.pandas.connect() + assert dict(con.tables) == {} + + def test_client_table(table): assert isinstance(table.op(), ibis.expr.operations.DatabaseTable) assert isinstance(table.op(), PandasTable) diff --git a/ibis/backends/polars/__init__.py b/ibis/backends/polars/__init__.py index 211a4042cf3a..75aa0bccfc2a 100644 --- a/ibis/backends/polars/__init__.py +++ b/ibis/backends/polars/__init__.py @@ -42,7 +42,7 @@ def do_connect( Parameters ---------- tables - Mutable mapping of string table names to polars LazyFrames. + An optional mapping of string table names to polars LazyFrames. """ if not tables: tables = {}