I am originally trying to save a table in kdb, but I was getting a type error:
q)save `:tbl.csv
'type
[14] save `:tbl.csv
^
When I looked up the reason for why this might be the case, it turned out to be one specific column with a strange data type:
q)cols[tbl] where 1<(count distinct type each)each tbl cols tbl
,`NEW_COLUMN
q)metaa tbl
17335 rows; 83 cols
c k| t f a FIRSTROW
------------------------------ -| - - - -----------------------------
NEW_COLUMN | j
q)select distinct NEW_COLUMN from tbl
NEW_COLUMN
-------------
0N
`
`N
I am trying to understand what 0N is and how I can replace it with just `. Does anyone know how I can do this? I tried to select all rows with 0N but I get an error, which must be because it’s some kind of null type:
q)select from tbl where NEW_COLUMN = 0N
'type
[0] select from tbl where NEW_COLUMN= 0N
^
Any help is much appreciated!