Discussions

Expand all | Collapse all

how to use ROUND_TO_DIGIT in pymapd

  • 1.  how to use ROUND_TO_DIGIT in pymapd

    Posted 20 days ago
    can you share an example of how to use round_to_digit in pymapd
    #Examples

    ------------------------------
    nagulan [[Unknown]]
    [[Unknown]]
    salem
    ------------------------------


  • 2.  RE: how to use ROUND_TO_DIGIT in pymapd

    OmniSci Employee
    Posted 19 days ago
    Edited by Randy Zwitch 19 days ago
    Using this function in pymapd is the same as in the query interface, as pymapd just submits queries to the backend. So you would do something like this:


    import pymapd

    conn = pymapd.connect()
    sql = "select round_to_digit(colname, 3) from table limit 100"
    df = conn.execute(sql).fetchall()


    ------------------------------
    Randy Zwitch
    Senior Director of Developer Advocacy
    OmniSci
    Philadelphia PA
    ------------------------------