Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Parameters
----------
module : str/list, optional
Module name(s) which to inspect. The default None will result in all
modules
Returns
-------
pd.Series
A Series of all variables. The MultiIndex indicated which module
provides the variable and with which feature name the variable can be
obtained.
"""
features = {name: m.features for name, m in datamodules.items()}
features = pd.DataFrame(features).unstack().dropna() \
.rename_axis(index=['module', 'feature']).rename('variables')
if module is not None:
features = features.reindex(atleast_1d(module), level='module')
return features.explode()