KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ kdb equivalent of pandas groupby Re: kdb equivalent of pandas groupby

  • Laura

    Administrator
    November 22, 2021 at 12:00 am

    For this query you are better using the ‘update’ query rather than ‘select’.

     

    This will show you the updated trade table but it will not save it in place as the new trade table. If you want to save the new column to the trade table permanently then use `trades in the update statement, i.e. update change:price-prev price by sym from `trade

    Here’s a link if you want to read more about the update statement.

    https://code.kx.com/q4m3/9_Queries_q-sql/#95-the-update-template