UserSpace.new_space_from_pandas#
- UserSpace.new_space_from_pandas(obj, space=None, cells=None, param=None, space_params=None, cells_params=None)#
Create child spaces from Pandas DataFrame or Series.
Warning
This method is deprecated.
Create a space named
spaceand optionally and cells in it from Pandas DataFrame or Series passed inobj. Ifspaceis not given, the space is namedSpaceNwhereNis automatically given by modelx. Parameter names are taken fromobjindexes, unlessparamis given to override index names.objcan have MultiIndex as its index. If the index(es) ofobjhas/have name(s), the parameter name(s) of the cells is/are set to the name(s), but can be overwritten byparamparameter. If the index(es) ofobjhas/have no name(s), andparamis not given, error is raised.- Parameters:
obj – DataFrame or Series.
space – Space name.
param – Sequence of strings to set parameter name(s). A single string can also be passed to set a single parameter name when
framehas a single level index (i.e. not MultiIndex).space_params – Sequence of strings or integers to specify space parameters by name or index.
cells_params – Sequence of strings or integers to specify cells parameters by name or index.
See also
new_cells_from_pandas(): Create Cells from DataFrame or Series.Changed in version 0.20.0: this method is deprecated.