wholecell.utils.data
Miscellaneous data structure utilities.
- wholecell.utils.data.dissoc(mapping, keys)[source]
Dissociate: Return a new dict like mapping without the given keys. See also dissoc_strict().
- wholecell.utils.data.dissoc_strict(mapping, keys)[source]
Dissociate: Return a new dict like mapping without the given keys. Raises a KeyError if any of these keys are not in the given mapping.
- wholecell.utils.data.expand_keyed_env_vars(data)[source]
If data is a dict, return a new dict where each _keyed environment ‘$VARIABLE’ value is expanded into a non-underscore entry, e.g.:
{‘_foo’: ‘$HOME’} –> {‘foo’: ‘/Users/franklin’, ‘_foo’: ‘$HOME’}
To trigger expansion, an entry must have a key string starting with ‘_’ and a value string starting with ‘$’ that names an environment variable.