KX Community

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

Home Forums PyKX PyKX for your CTO

  • iodwyer

    Member
    July 31, 2023 at 12:00 am

    Nice blog  !!

     

    I have one suggestion:

    Instead of copying the weather table into the kdb memory space, you can pass the weather PyKX object to kx.q.sql like so:

     

    >>> weather = kx.q.read.csv('./abr_meteo23.csv', types='IIII****' + 'FS'*24, delimiter=';', as_table=True) >>> ## kx.q['weather'] = weather
    >>> kx.q.sql('select STATION, count(distinct(MAGNITUDE)) from $1 group by STATION', weather)
  • jserrano

    Member
    August 1, 2023 at 12:00 am

    Sure, thanks! It’s been already corrected.

Log in to reply.