How to detect 'null' value in Nodebox?
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.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by Frederik De Ble... on 22 Mar, 2013 05:03 PM
Do you get null as an error message, or is the value empty?
2 Posted by Kyuha Shim on 22 Mar, 2013 05:08 PM
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.
Mar 22, 2013 1:03 PM Frederik De Bleser <[email blocked]> 작성:
Support Staff 3 Posted by Frederik De Ble... on 22 Mar, 2013 05:17 PM
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.
4 Posted by Kyuha Shim on 22 Mar, 2013 07:41 PM
Thank you Frederik. It works :) Is it also possible to change strings to All Caps? Please let me know.
Q / K y u h a S h i m
Research Fellow / Data Visualization Specialist | Senseable City Lab, MIT
Faculty | MFA Digital+Media, RISD
MIT 9-209, 77 Massachusetts Ave,
Cambridge, MA 02139 USA
e [email blocked]<mailto:[email blocked]> || [email blocked]<mailto:[email blocked]>
Support Staff 5 Posted by lucasnijs on 23 Mar, 2013 08:32 PM
You can write your own python code to do that and then make your own node e.g.:See how to make your own nodes: here
Support Staff 6 Posted by Frederik De Ble... on 26 Mar, 2013 11:24 AM
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.