Hello,
I understand the intuition for “t”, “T” and “1” to be truthy characters, but can someone please explain why “x”,“X”,“y”,“Y” are considered truthy?
Furthermore, can someone provide an example where truthy characters would be used in practice?
/ Truthy characters.q).Q.an where"B"$'.Q.an"txyTXY1"
Thanks!
“Yy” would represent “Yes”, while my guess is that “Xx” would be to indicate a crossed box on a spreadsheet or form.
It’s use is primarily in loading text/csv/excel sheets into kdb where columns may have Y/N for yes/no and X or blank as a binary flag.
q)(“SBB”;1#csv)0:(“c1,c2,c3”;“a,y,x”;“b,n,”;“c,n,x”)
c1 c2 c3
a 1 1
b 0 0
c 0 1
Terry