Exclude Nones
This function block removes None entries from a provided list. Use it when you need a clean list without empty placeholders before further processing or exporting.
π₯ Inputs
Data List β Input socket that accepts a list of values. Elements may be of any type and some may be None.
π€ Outputs
Filtered Data List β Output socket that returns the same list order but with all None elements removed.
πΉοΈ Controls
This block has no user-adjustable controls. It runs automatically when the input list is provided.
π― Features
Simple and fast removal of
Nonevalues while preserving original order.Works with mixed-type lists (numbers, strings, images, dictionaries, etc.).
Useful to sanitize batch or list outputs before downstream processing or exporting.
βοΈ Running mechanism
On evaluation the block reads the value from the Data List input, filters out any elements that are None, and emits the cleaned list to Filtered Data List. If the input is empty or contains only None values, the output will be an empty list.
π‘ Tips and Tricks
Combine with
Replace Nonewhen you prefer substituting default values instead of removing items.Use
Get ElementorList Operationsafter this block to safely access or manipulate list items without checking forNone.Use
Is Nonebefore this block to branch logic (for example, skip processing when many items areNone).For batch workflows, pair with
Batch Processing,Debatch, orBatch Concatenationto handle list/batch inputs and outputs cleanly.Store cleaned results with
Data Memoryif you need to freeze the filtered list until an update is requested.Prepare data for export by piping the output into
Data to JSON,CSV Export, orImage Logger(when list contains images).Use
Debug Inputto inspect incoming lists if results look unexpected.
π οΈ Troubleshooting
If the output still contains
None, confirm that the value atData Listis truly a list and not a different data type.If nothing appears on the output, check upstream blocks with
Debug Inputto ensure they are producing the expected list.
Last updated
Was this helpful?