Module ImportFrom alias alias alias Import alias identifier ImportFrom alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Import alias identifier Import alias Import alias Import alias Import alias Import alias Assign NameStore GeneratorExp BinOpMod Str NameLoad comprehension NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If CompareIn Str NameLoad body Return BinOpMod Str NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd Call NameLoad NameLoad NameLoad Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad body Return TupleLoad Call NameLoad AttributeLoad NameLoad attr Dict Return Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Return TupleLoad Call NameLoad NameLoad Dict decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Return TupleLoad Call NameLoad NameLoad Dict Str Str NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults NameLoad body Return TupleLoad Call NameLoad AttributeLoad NameLoad attr Dict decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad Call NameLoad NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad AttributeLoad Call NameLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Dict Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad AttributeLoad Call NameLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Dict Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Dict Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str NameLoad NameLoad decorator_list Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str Call NameLoad NameLoad Call AttributeLoad NameLoad attr Dict Str NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad Call NameLoad NameLoad attr attr Return TupleLoad BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Return TupleLoad BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str NameLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad keyword Lambda arguments args NameParam defaults CompareIsNot NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return TupleLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call NameLoad keyword AttributeLoad NameLoad attr decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad Call NameLoad NameLoad attr decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore ListComp SubscriptLoad Call NameLoad ListLoad NameLoad NameLoad Index Num comprehension NameStore NameLoad Return TupleLoad BinOpMod Str TupleLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list
N/A __future__ absolute_import division print_function N/A pandas pd expr Expr Symbol Field Arithmetic UnaryMath BinaryMath Date Time DateTime Millisecond Microsecond broadcast sin cos Map UTCFromTimestamp DateTimeTruncate symbol USub Not notnull greatest least atan2 Like expr math expr_math expr.expressions valid_identifier dispatch dispatch N/A pydatetime N/A numpy np N/A datetime N/A fnmatch N/A math N/A toolz N/A itertools N/A funcnames N/A N/A func_%d i N/A i N/A N/A itertools count parenthesize N/A N/A s N/A N/A N/A N/A s N/A N/A N/A (%s) s N/A N/A s N/A print_python N/A N/A leaves expr N/A N/A N/A  Print expression to be evaluated in Python

    >>> from blaze.expr import ceil, sin

    >>> t = symbol('t', '{x: int, y: int, z: int, when: datetime}')
    >>> print_python([t], t.x + t.y)
    ('t[0] + t[1]', {})

    Supports mathematical and datetime access

    >>> print_python([t], sin(t.x) > ceil(t.y))  # doctest: +SKIP
    ('math.sin(t[0]) > math.ceil(t[1])', {'math':<module 'math'>})
    >>> print_python([t], t.when.day + 1)
    ('t[3].day + 1', {})

    Specify leaves of the expression to control level of printing

    >>> print_python([t.x, t.y], t.x + t.y)
    ('x + y', {})

    Returns
    -------

    s: string
       A evalable string
    scope: dict
       A namespace to add to be given to eval
     N/A N/A N/A isinstance expr Expr N/A any N/A N/A N/A expr isidentical lf N/A lf leaves N/A N/A N/A N/A valid_identifier N/A expr _name N/A N/A N/A _print_python expr leaves leaves N/A _print_python N/A N/A expr leaves N/A None N/A N/A N/A N/A repr expr N/A N/A N/A dispatch object _print_python N/A N/A expr leaves N/A None N/A N/A N/A N/A repr expr N/A datetime Timestamp datetime N/A pd Timestamp N/A N/A dispatch N/A N/A datetime datetime N/A datetime date _print_python N/A N/A expr leaves N/A None N/A N/A N/A N/A valid_identifier N/A expr _name N/A N/A N/A dispatch Symbol _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A index N/A N/A N/A N/A expr _child fields index N/A expr _name N/A N/A N/A %s[%d] N/A N/A parenthesize child index scope N/A N/A dispatch Field _print_python N/A N/A expr leaves N/A None N/A N/A N/A lhs left_scope N/A print_python leaves N/A expr lhs N/A N/A rhs right_scope N/A print_python leaves N/A expr rhs N/A N/A N/A %s %s %s N/A N/A parenthesize lhs N/A expr symbol N/A parenthesize rhs N/A N/A toolz merge left_scope right_scope N/A N/A dispatch Arithmetic _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A %s%s N/A N/A expr symbol N/A parenthesize child scope N/A N/A dispatch USub _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A not %s N/A parenthesize child scope N/A N/A dispatch Not _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A np.%s(%s) N/A N/A N/A type expr __name__ child N/A N/A toolz merge scope N/A np np N/A N/A dispatch UnaryMath _print_python N/A N/A expr leaves N/A None N/A N/A N/A lhs scope_lhs N/A print_python leaves N/A expr lhs N/A N/A rhs scope_rhs N/A print_python leaves N/A expr rhs N/A N/A N/A np.%s(%s, %s) N/A N/A N/A type expr __name__ lhs rhs N/A N/A toolz merge scope_lhs scope_rhs N/A np np N/A N/A dispatch BinaryMath _print_python N/A N/A expr leaves N/A None N/A N/A N/A lhs scope_lhs N/A print_python leaves N/A expr lhs N/A N/A rhs scope_rhs N/A print_python leaves N/A expr rhs N/A N/A N/A np.arctan2(%s, %s) N/A lhs rhs N/A N/A toolz merge scope_lhs scope_rhs N/A np np N/A N/A dispatch atan2 _print_python N/A N/A expr leaves N/A None N/A N/A N/A lhs scope_lhs N/A print_python leaves N/A expr lhs N/A N/A rhs scope_rhs N/A print_python leaves N/A expr rhs N/A N/A N/A max(%s, %s) N/A lhs rhs N/A N/A toolz merge scope_lhs scope_rhs N/A N/A dispatch greatest _print_python N/A N/A expr leaves N/A None N/A N/A N/A lhs scope_lhs N/A print_python leaves N/A expr lhs N/A N/A rhs scope_rhs N/A print_python leaves N/A expr rhs N/A N/A N/A min(%s, %s) N/A lhs rhs N/A N/A toolz merge scope_lhs scope_rhs N/A N/A dispatch least _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A abs(%s) child scope N/A N/A dispatch N/A expr_math abs _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A %s.date() N/A parenthesize child scope N/A N/A dispatch Date _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A %s.time() N/A parenthesize child scope N/A N/A dispatch Time _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A %s.microsecond // 1000 N/A parenthesize child scope N/A N/A dispatch Millisecond _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A datetime.datetime.utcfromtimestamp(%s) N/A parenthesize child N/A N/A toolz merge N/A datetime datetime scope N/A N/A dispatch UTCFromTimestamp _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A attr N/A N/A N/A N/A type expr __name__ lower N/A N/A N/A %s.%s N/A N/A parenthesize child attr scope N/A N/A dispatch DateTime _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A scope N/A truncate N/A pydatetime truncate N/A N/A N/A truncate(%s, %s, "%s") N/A child N/A expr measure N/A expr unit scope N/A N/A dispatch DateTimeTruncate _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A funcname N/A next funcnames N/A N/A N/A %s(%s) N/A funcname child N/A N/A toolz assoc scope funcname N/A expr func N/A N/A dispatch Map _print_python N/A N/A expr leaves N/A None N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A notnull(%s) child N/A N/A toolz merge scope N/A dict notnull N/A N/A N/A x N/A N/A x None N/A N/A dispatch notnull _print_python N/A N/A expr leaves N/A N/A N/A N/A child scope N/A print_python leaves N/A expr _child N/A N/A N/A fnmatch(%s, %r) N/A child N/A expr pattern N/A N/A toolz merge scope N/A dict fnmatch N/A fnmatch fnmatch N/A N/A dispatch Like _print_python N/A N/A expr leaves N/A None N/A N/A N/A NotImplementedError N/A Do not know how to write expressions of type %s to Python code N/A N/A type expr __name__ N/A N/A dispatch Expr funcstr N/A N/A leaves expr N/A N/A N/A  Lambda string for an expresion

    >>> t = symbol('t', '{x: int, y: int, z: int, when: datetime}')

    >>> funcstr([t], t.x + t.y)
    ('lambda t: t[0] + t[1]', {})

    >>> funcstr([t.x, t.y], t.x + t.y)
    ('lambda x, y: x + y', {})

    Also returns scope for libraries like math or datetime

    >>> funcstr([t.x, t.y], sin(t.x) + t.y)  # doctest: +SKIP
    ('lambda x, y: math.sin(x) + y', {'math': <module 'math'>})

    >>> from datetime import date
    >>> funcstr([t.x, t.y, t.when], t.when.date > date(2001, 12, 25)) #doctest: +SKIP
    ('lambda x, y, when: when.day > datetime.date(2001, 12, 25)', {'datetime': <module 'datetime'>})
     N/A N/A result scope N/A print_python leaves expr N/A leaf_names N/A N/A N/A print_python N/A leaf leaf N/A 0 N/A leaf leaves N/A N/A N/A lambda %s: %s N/A N/A N/A ,  join leaf_names result scope N/A lambdify N/A N/A leaves expr N/A N/A N/A  Lambda for an expresion

    >>> t = symbol('t', '{x: int, y: int, z: int, when: datetime}')
    >>> f = lambdify([t], t.x + t.y)
    >>> f((1, 10, 100, ''))
    11

    >>> f = lambdify([t.x, t.y, t.z, t.when], t.x + cos(t.y))
    >>> f(1, 0, 100, '')
    2.0
     N/A N/A s scope N/A funcstr leaves expr N/A N/A eval s scope N/A