Model.new_space_from_pandas#
- Model.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
space
and optionally and cells in it from Pandas DataFrame or Series passed inobj
. Ifspace
is not given, the space is namedSpaceN
whereN
is automatically given by modelx. Parameter names are taken fromobj
indexes, unlessparam
is given to override index names.obj
can have MultiIndex as its index. If the index(es) ofobj
has/have name(s), the parameter name(s) of the cells is/are set to the name(s), but can be overwritten byparam
parameter. If the index(es) ofobj
has/have no name(s), andparam
is 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
frame
has 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.