From 7bdcc9b3a52e1a8f28e9579b00b04fb694f59608 Mon Sep 17 00:00:00 2001 From: BubbleCal Date: Mon, 18 May 2026 21:51:04 +0800 Subject: [PATCH] fix(python): preserve to_pandas fallback paths --- python/python/lancedb/table.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/python/python/lancedb/table.py b/python/python/lancedb/table.py index 2ddf6272b..0830519a4 100644 --- a/python/python/lancedb/table.py +++ b/python/python/lancedb/table.py @@ -762,9 +762,7 @@ class Table(ABC): """ raise NotImplementedError - def to_pandas( - self, blob_mode: BlobMode = "lazy", **kwargs - ) -> "pandas.DataFrame": + def to_pandas(self, blob_mode: BlobMode = "lazy", **kwargs) -> "pandas.DataFrame": """Return the table as a pandas DataFrame. Parameters @@ -2209,6 +2207,12 @@ class LanceTable(Table): ------- pd.DataFrame """ + if blob_mode == "lazy" and ( + self._namespace_client is not None + or get_uri_scheme(self._dataset_path) == "memory" + ): + return self.to_arrow().to_pandas(**kwargs) + return self.to_lance().to_pandas(blob_mode=blob_mode, **kwargs) def to_arrow(self) -> pa.Table: