capturegraph.data.containers.utilities.compact
#
compact - Remove Missing Values#
Remove MissingType values from nested List/Dict structures.
Example
compact(data)
#
Remove MissingType values from a collection.
Recursively filters out Missing values from nested List/Dict structures. Returns MissingType if all values are Missing (or the collection is empty).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Any
|
A List or Dict potentially containing MissingType values. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
Filtered collection, or MissingType if nothing remains. |