Module Import alias identifier Import alias identifier Import alias If CompareGtE SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore TupleLoad NameLoad Assign NameStore TupleLoad NameLoad Assign NameStore NameLoad orelse Assign NameStore TupleLoad NameLoad NameLoad Assign NameStore TupleLoad NameLoad NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If Call NameLoad NameLoad Str body Assign NameStore ListLoad NameLoad Assign NameStore Dict For NameStore NameLoad body For NameStore NameLoad body If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad If CompareIsNot SubscriptLoad NameLoad Index NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call NameLoad SubscriptLoad NameLoad Index NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Num keyword SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad With NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Print Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Return NameLoad decorator_list
N/A N/A numpy np N/A sqlite3 sql N/A sys N/A N/A N/A N/A sys version_info N/A 0 3 N/A N/A int_types N/A int N/A string_types N/A str N/A blob_type bytes N/A N/A int_types N/A int long N/A string_types N/A str unicode N/A blob_type buffer dict_to_dtypes N/A N/A data order N/A None N/A N/A 
    Parses data types from a dictionary or list of dictionaries.

    The dictionary keys will be paired with the types of the
    corresponding values, e.g.::

        (key, type(data[key]))

    If there are multiple dictionaries that have the same keys, the
    value types should be the same across dictionaries (with the
    exception of NoneType).

    For example::

        dict_to_dtypes(data=[
            {'name': 'apple', 'fruit': True, 'tree': True},
            {'name': 'tomato', 'fruit': True, 'tree': False},
            {'name': 'cucumber', 'fruit': False, 'tree': False}
        ])

    will return::

        [('fruit', bool), ('name', str), ('tree', bool)]

    Parameters
    ----------
    data : dictionary or list of dictionaries
        Data to extract names and dtypes from.

    order : list of strings (optional)
        The order in which to return the dtypes in, by key. If None, the
        dtypes will be sorted alphabetically by key.

    Returns
    -------
    dtypes : list of 2-tuples
        Each tuple in the list has the form (key, dtype)

     N/A N/A hasattr data keys N/A N/A data N/A data N/A all_types N/A N/A x data N/A N/A key x N/A N/A N/A key all_types N/A N/A N/A all_types N/A key N/A set N/A N/A N/A x N/A key None N/A N/A N/A N/A N/A all_types N/A key add N/A type N/A x N/A key N/A N/A order None N/A N/A order N/A sorted N/A N/A all_types keys N/A types N/A N/A key order N/A N/A t N/A list N/A all_types N/A key N/A N/A N/A len t 1 N/A N/A N/A ValueError N/A could not determine datatype of column '%s' key N/A tt N/A type N/A N/A np asscalar N/A N/A np array N/A 0 dtype N/A t N/A 0 N/A N/A N/A types append N/A key tt N/A types N/A sql_execute N/A N/A conn cmd fetchall verbose N/A False False N/A N/A 
    Execute a SQL command `cmd` in database `db`.

    Parameters
    ----------
    conn : sqlite3.Connection
        Connection to the SQLite database.
    cmd : string or list
        Command to be executed. Specifically, these are parameters to be passed
        to `sqlite3.Cursor.execute`. See:

        http://docs.python.org/2/library/sqlite3.html#sqlite3.Cursor.execute
    fetchall : bool (optional)
        Fetch the result of the command, and return it.
    verbose : bool (optional)
        Print the command that is run.

    Returns
    -------
    result : list or None
        The result of the executed command, if `fetchall` is True.

     N/A N/A isinstance cmd string_types N/A N/A cmd N/A cmd N/A conn N/A N/A cur N/A N/A conn cursor N/A verbose N/A N/A N/A N/A ,  join N/A N/A str x N/A x cmd N/A N/A N/A cur execute cmd N/A fetchall N/A N/A result N/A N/A cur fetchall N/A N/A result None N/A result N/A