How to detect 'null' value in Nodebox?

Q's Avatar


22 Mar, 2013 02:44 PM

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.

  1. Support Staff 1 Posted by Frederik De Ble... on 22 Mar, 2013 05:03 PM

    Frederik De Bleser's Avatar

    Do you get null as an error message, or is the value empty?

  2. 2 Posted by Kyuha Shim on 22 Mar, 2013 05:08 PM

    Kyuha Shim's Avatar

    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]> 작성:

  3. Support Staff 3 Posted by Frederik De Ble... on 22 Mar, 2013 05:17 PM

    Frederik De Bleser's Avatar

    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. 4 Posted by Kyuha Shim on 22 Mar, 2013 07:41 PM

    Kyuha Shim's Avatar

    Thank you Frederik. It works :) Is it also possible to change strings to All Caps? Please let me know.
    Thank you.


    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]>
    t +1.401.924.1002

  5. Support Staff 5 Posted by lucasnijs on 23 Mar, 2013 08:32 PM

    lucasnijs's Avatar

    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
  6. Support Staff 6 Posted by Frederik De Ble... on 26 Mar, 2013 11:24 AM

    Frederik De Bleser's Avatar

    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.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 May, 2024 05:47 AM
29 May, 2024 05:15 AM
29 May, 2024 05:12 AM
28 May, 2024 07:37 PM
25 May, 2024 11:52 AM


24 May, 2024 07:39 AM
16 May, 2024 02:11 AM
14 May, 2024 01:29 AM
12 May, 2024 07:46 PM
05 May, 2024 04:38 PM
03 May, 2024 06:50 AM