modelx v0.20.0 (17 September 2022)#
This release introduces the following enhancements, changes and bug fixes.
To update modelx, run the following command:
>>> pip install modelx --upgrade
If you’re using Anaconda, use the
conda command instead:
>>> conda update modelx
If you’re using the Spyder plugin for modelx, the spymx-kernels pakcage is also updated, so update it as well by either:
>>> pip install spymx-kernels --upgrade
or on Anaconda,
>>> conda update spymx-kernels
Saving multiple pandas DataFrame and Series objects in one Excel file#
Prior to v0.20.0, pandas DataFrame and Series objects referenced in a model are written to separate files when the model is saved.
With modelx v0.20.0,
sheet parameter to indicate the name of the sheet the
pandas object is written on.
This enables multiple pandas objects to be written to separate sheets
in the same Excel file.
New methods and properties for IOSpec operations#
IOSpec objects are those whose types are derived from
IOSpec objects are associated with data objects referenced in models,
and specify how the data objects should be written to files.
The methods and properties below are introduced to handle IOSpec objects.
Model.get_specmethod is introduced.
Model.del_specmethod is introduced.
BaseSpecIO.pathproperty is introduced.
PandasData.sheetproperty is introduced.
Backward Incompatible Changes#
Deprecated old methods#
From v0.20.0, the following methods are deprecated.
These methods were introduced in early versions of modelx
long before the intoduction of
Instead of using these methods, consider using
UserSpace.new_pandas for storing data in models.
The following methods are removed from
The user should use
Renamed classes and methods#
BaseDataSpecis renamed to
Model.dataspecsis renamed to
UserSpace.new_pandasis deprecated and
file_typeis introduced to replace it.
Bug in changing the formula of a cells in a base space where the derived cells of the cells were defined in sub spaces of the base space.
Deprecation warning on reading Series.