Make '0' valuse = Null


I can only find the opposite (make null values = 0)

But i want to make ‘0’ values = null.

Dear Samuel - is this a grasshopper question ? or what s the context of your topic ?

Hello Tom,

Yes appologies it is a grasshopper question.

Here is the script for context:

null to 0 (10.5 KB)

If you dont have the plug-in ‘Heteroptera’ and dont want to download it:

Here is an image of the script with a panel showing the outcome data that i want to change the ‘0’ values to ‘null’:


null to (12.3 KB)

If you’re wanting to replace items in a list with nulls, you can use the Replace Items component:

Edit: I see @Joseph_Oster already provided the answer, he must have posted while I was making screen capture.


Same result, less code:

null to (10.4 KB)

1 Like

This is a great help!

Thank you guys.