Hello,
I imported data using import_csv and I am trying to catch null value. Is there any node supporting that?
Please let me know. Thank you.
The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.
NodeBox 3From the old forum
How to detect 'null' value in Nodebox?
-
-
NodeBox team Do you get null as an error message, or is the value empty?
-
The value is empty. I was trying to change those items to either 0 or ' '. How do I do that? Please let me know. Thank you.
Cheers,
QMar 22, 2013 1:03 PM Frederik De Bleser tender2+dd23ce3e979262f531e6445f595520e69cae5c6e2@tenderapp.com 작성:
-
NodeBox team You could try using a "replace" node: connect a lookup node to import CSV and use a replace node to replace the empty string with "0". Afterwards, you might want to try converting everything to numbers again (using a number or integer node).
If this approach does not work, we could consider adding a "default value on blank" option to the import CSV node.
-
Thank you Frederik. It works :) Is it also possible to change strings to All Caps? Please let me know.
Thank you.Cheers,
QQ / K y u h a S h i m
Research Fellow / Data Visualization Specialist | Senseable City Lab, MIT
Faculty | MFA Digital+Media, RISDMIT 9-209, 77 Massachusetts Ave,
Cambridge, MA 02139 USAe qshim@mit.edumailto:qshim@mit.edu || qshim@risd.edumailto:qshim@risd.edu
t +1.401.924.1002
w http://kyuhashim.com -
You can write your own python code to do that and then make your own node e.g.:
@@@
def capitalize(str):
s= str.upper()
return s
@@@
See how to make your own nodes: here -
NodeBox team We should probably add a "change case" node that can switch between upper-, lower- and title case.
I've created a GitHub Issue that tracks this.