KX Community

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

Home Forums KX Academy Introduction to PyKX section 3 Exercise 10

  • Introduction to PyKX section 3 Exercise 10

    Posted by ziong on September 27, 2024 at 4:11 pm

    Hi all,

    for the exercise 10:

    Return all close prices and volume from tab_BTC for the last date


    I wonder that the suggested solution may be incorrect.

    tab_BTC.get(['volume', 'close', 'date'], tab_BTC['date'] == kx.q.max(tab_BTC))

    it returns all rows without filtering the date with last date.

    see attached.


    seems that this should work like this (returns 180 row):

    tab_BTC[tab_BTC['date'] == kx.q.max(tab_BTC['date']), ['volume', 'close']]
    • This discussion was modified 1 week, 3 days ago by  ziong.
    • This discussion was modified 1 week, 3 days ago by  ziong.
    megan_mcp replied 6 days, 9 hours ago 2 Members · 1 Reply
  • 1 Reply
  • megan_mcp

    Administrator
    October 1, 2024 at 8:58 am

    Hi @ziong

    Thank you for bringing this to our attention. We will make sure to correct this !

    Thanks,

    Megan

Log in to reply.