Amend the fares list to replace nulls.

https://learninghub.kx.com/forums/topic/amend-the-fares-list-to-replace-nulls

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.

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

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,

Hi @Richard-Mandel,

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

Many thanks,

Megan

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

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

Thanks again,

Megan