本文整理汇总了Python中blaze.expr.TableSymbol._leaves方法的典型用法代码示例。如果您正苦于以下问题:Python TableSymbol._leaves方法的具体用法?Python TableSymbol._leaves怎么用?Python TableSymbol._leaves使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类blaze.expr.TableSymbol
的用法示例。
在下文中一共展示了TableSymbol._leaves方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_leaves
# 需要导入模块: from blaze.expr import TableSymbol [as 别名]
# 或者: from blaze.expr.TableSymbol import _leaves [as 别名]
def test_leaves():
t = TableSymbol('t', '{id: int32, name: string}')
v = TableSymbol('v', '{id: int32, city: string}')
x = Symbol('x', 'int32')
assert t._leaves() == [t]
assert t.id._leaves() == [t]
assert by(t.name, t.id.nunique())._leaves() == [t]
assert join(t, v)._leaves() == [t, v]
assert join(v, t)._leaves() == [v, t]
assert (x + 1)._leaves() == [x]
示例2: test_leaves
# 需要导入模块: from blaze.expr import TableSymbol [as 别名]
# 或者: from blaze.expr.TableSymbol import _leaves [as 别名]
def test_leaves():
t = TableSymbol("t", "{id: int32, name: string}")
v = TableSymbol("v", "{id: int32, city: string}")
x = symbol("x", "int32")
assert t._leaves() == [t]
assert t.id._leaves() == [t]
assert by(t.name, count=t.id.nunique())._leaves() == [t]
assert join(t, v)._leaves() == [t, v]
assert join(v, t)._leaves() == [v, t]
assert (x + 1)._leaves() == [x]