ibis.expr.api.TableExpr.cross_join¶
-
TableExpr.
cross_join
(*tables, **kwargs)¶ Perform a cross join (cartesian product) amongst a list of tables, with optional set of prefixes to apply to overlapping column names
Parameters: tables : ibis.expr.types.TableExpr Returns: joined : TableExpr Examples
>>> import ibis >>> schemas = [(name, 'int64') for name in 'abcde'] >>> a, b, c, d, e = [ ... ibis.table([(name, type)], name=name) for name, type in schemas ... ] >>> joined1 = ibis.cross_join(a, b, c, d, e) >>> joined1 ref_0 UnboundTable[table] name: a schema: a : int64 ref_1 UnboundTable[table] name: b schema: b : int64 ref_2 UnboundTable[table] name: c schema: c : int64 ref_3 UnboundTable[table] name: d schema: d : int64 ref_4 UnboundTable[table] name: e schema: e : int64 CrossJoin[table] left: Table: ref_0 right: CrossJoin[table] left: CrossJoin[table] left: CrossJoin[table] left: Table: ref_1 right: Table: ref_2 right: Table: ref_3 right: Table: ref_4