KX Community

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

Home Forums KX Academy Amend the fares list to replace nulls.

  • Amend the fares list to replace nulls.

    Posted by Richard-Mandel on October 25, 2024 at 9:46 pm

    The solution shows ‘@[fares;where null fares;:;avg fares]’, but to actually amend the list, it should be @[`fares;where null fares;:;avg fares], right? The backtick is needed to amend the fares list.

    megan_mcp replied 1 month, 3 weeks ago 3 Members · 5 Replies
  • 5 Replies
  • jlucid

    Member
    October 30, 2024 at 11:12 am

    Yes you need the backtick to amend the fares list. Leaving it out just returns the modified list, which you could then assign to another variable

  • Richard-Mandel

    Member
    October 30, 2024 at 3:51 pm

    I should have been more clear in my post. The solution in the exercise is wrong. It mentions amending the table, but their solution doesn’t include the backtick.

    Thanks,

  • megan_mcp

    Administrator
    October 30, 2024 at 4:01 pm

    Hi @Richard-Mandel,

    Can you let me know which course and notebook this exercise is in?

    Many thanks,

    Megan

    • This reply was modified 1 month, 3 weeks ago by  megan_mcp.
  • Richard-Mandel

    Member
    October 30, 2024 at 4:15 pm

    Hi Megan,

    In Session 3 Data Structures, Exercise 17 it says “Amend the fares list to replace the null values to be equal to the average value”. The solution it shows is “@[fares;where null fares;:;avg fares]”. This is incorrect. It’s missing the tick prior to “fares”.

    Thanks,

    -Richard

  • megan_mcp

    Administrator
    October 30, 2024 at 4:31 pm

    Perfect, @Richard-Mandel thank you for bringing this to our attention. I will take a look and adjust this solution.

    Thanks again,

    Megan

Log in to reply.