Pandas to the rescue, use na_rep to fix your own representation for NaNs.
df.to_csv('file.csv', na_rep='NULL')
file.csv
,index,x,y,z
0,0,1.0,NULL,2
1,1,NULL,3.0,4
Pandas to the rescue, use na_rep to fix your own representation for NaNs.
df.to_csv('file.csv', na_rep='NULL')
file.csv
,index,x,y,z
0,0,1.0,NULL,2
1,1,NULL,3.0,4