File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -733,7 +733,26 @@ def to_torch(
733
733
)
734
734
735
735
def unbind (self ) -> ir .Table :
736
- """Return an expression built on `UnboundTable` instead of backend-specific objects."""
736
+ """Return an expression built on `UnboundTable` instead of backend-specific objects.
737
+
738
+ Examples
739
+ --------
740
+ >>> import ibis
741
+ >>> import pandas as pd
742
+ >>> duckdb_con = ibis.duckdb.connect()
743
+ >>> polars_con = ibis.polars.connect()
744
+ >>> for backend in (duckdb_con, polars_con):
745
+ ... t = backend.create_table("t", pd.DataFrame({"a": [1, 2, 3]}))
746
+ >>> bound_table = duckdb_con.table("t")
747
+ >>> bound_table.get_backend().name
748
+ 'duckdb'
749
+ >>> unbound_table = bound_table.unbind()
750
+ >>> polars_con.execute(unbound_table)
751
+ a
752
+ 0 1
753
+ 1 2
754
+ 2 3
755
+ """
737
756
from ibis .expr .rewrites import _ , d , p
738
757
739
758
rule = p .DatabaseTable >> d .UnboundTable (
You can’t perform that action at this time.
0 commit comments