From aa91f35a287380562fd0c89b2626e9700e004434 Mon Sep 17 00:00:00 2001 From: Lei Xu Date: Tue, 8 Aug 2023 14:40:09 -0700 Subject: [PATCH] [Python][Remote] Raise meaningful exception for to_arrow() / to_pandas() (#413) --- python/lancedb/remote/table.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python/lancedb/remote/table.py b/python/lancedb/remote/table.py index 66bb224b..03f7aeea 100644 --- a/python/lancedb/remote/table.py +++ b/python/lancedb/remote/table.py @@ -45,7 +45,15 @@ class RemoteTable(Table): return schema def to_arrow(self) -> pa.Table: - raise NotImplementedError + """Return the table as an Arrow table.""" + raise NotImplementedError("to_arrow() is not supported on the LanceDB cloud") + + def to_pandas(self): + """Return the table as a Pandas DataFrame. + + Intercept `to_arrow()` for better error message. + """ + return NotImplementedError("to_pandas() is not supported on the LanceDB cloud") def create_index( self,