Comments

3 comments

  • Avatar
    Candido Dessanti

    Hi @leelakrishna_gairubo,

    Thanks for joining our community.

    If you are using the heavyai python sqllibrary you have to specify the condition into the sql used to query the table or if you want delete rows from table you should use a sql delete statement.

    If you need something similar to pandas you can try to use IBIS library, but I'm not sure if you can delete row from a table, but it should build the sql statements for aggregates, filtering and stuff like that.

    https://docs.heavy.ai/data-science/introduction-to-ibis

    Let me know if this replies to you question, because I'm not sure if I interpreted you question

    Regards, Candido

    0
    Comment actions Permalink
  • Avatar
    leelakrishna gairuboina

    Hi @candido.dessanti ,

    I am glad to be part of the community. Thank you for the response and it is helpful.

    Regards, Leelakrishna.

    0
    Comment actions Permalink
  • Avatar
    Amandeep Kaur

    To delete selected rows from an OmniSci table using Python, you can use the pymapd library which provides a Python API for interacting with OmniSci databases. Here's an example code snippet that shows how to delete rows that match a certain condition:

    import pymapd # connect to OmniSci database conn = pymapd.connect(user='your_username', password='your_password', host='your_host', dbname='your_database') # define condition for rows to be deleted condition = "column_name = 'value'" # delete rows that match the condition conn.execute("DELETE FROM table_name WHERE " + condition) # close the connection conn.close()

    In this example, replace your_username, your_password, your_host, and your_database with your own database connection details. Also, replace column_name and 'value' with the name of the column and the value that you want to use as the condition for deleting rows. Finally, replace table_name with the name of the table that you want to delete rows from.

    Please visit: https://www.janbasktraining.com/online-python-training

    0
    Comment actions Permalink

Please sign in to leave a comment.