Merge pull request #323 from PyPSA/fix/deprecation-warning-pandas-1.4

Fix deprecation warning for 'closed' with pandas 1.4
This commit is contained in:
Fabian Neumann 2023-02-11 09:35:33 +01:00 committed by GitHub
commit 8d072a0169
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 8 deletions

View File

@ -25,7 +25,7 @@ countries: ['AL', 'AT', 'BA', 'BE', 'BG', 'CH', 'CZ', 'DE', 'DK', 'EE', 'ES', 'F
snapshots:
start: "2013-01-01"
end: "2014-01-01"
closed: 'left' # end is not inclusive
inclusive: 'left' # include start, not end
enable:
prepare_links_p_nom: false

View File

@ -24,7 +24,7 @@ countries: ['BE']
snapshots:
start: "2013-03-01"
end: "2013-04-01"
closed: 'left' # end is not inclusive
inclusive: 'left' # include start, not end
enable:
prepare_links_p_nom: false

View File

@ -1,4 +1,4 @@
,Unit,Values,Description
start,--,"str or datetime-like; e.g. YYYY-MM-DD","Left bound of date range"
end,--,"str or datetime-like; e.g. YYYY-MM-DD","Right bound of date range"
closed,--,"One of {None, left, right}","Make the time interval closed to the ``left``, ``right``, or open on both sides ``None``."
inclusive,--,"One of {'neither', 'both', left, right}","Make the time interval closed to the ``left``, ``right``, or both sides ``both`` or neither side ``None``."

1 Unit Values Description
2 start -- str or datetime-like; e.g. YYYY-MM-DD Left bound of date range
3 end -- str or datetime-like; e.g. YYYY-MM-DD Right bound of date range
4 closed inclusive -- One of {None, ‘left’, ‘right’} One of {'neither', 'both', ‘left’, ‘right’} Make the time interval closed to the ``left``, ``right``, or open on both sides ``None``. Make the time interval closed to the ``left``, ``right``, or both sides ``both`` or neither side ``None``.

View File

@ -10,12 +10,21 @@ Release Notes
Upcoming Release
================
* Carriers of generators can now be excluded from aggregation in clustering network and simplify network.
* Fix EQ constraint for the case no hydro inflow is available
* Bugfix in the reserve constraint will increase demand related reserve requirements
**New Features**
* Carriers of generators can now be excluded from aggregation in clustering network and simplify network.
**Breaking Changes**
* The config entry ``snapshots["closed"]`` was renamed to ``snapshots["inclusive"]`` to address the upstream deprecation with ``pandas=1.4``.
The previous setting ``None`` is no longer supported and replaced by ``both``, see the `pandas documentation <https://pandas.pydata.org/docs/reference/api/pandas.date_range.html>`_.
Minimum ``pandas`` version now required is `>= 1.4`.
PyPSA-Eur 0.6.1 (20th September 2022)
=====================================

View File

@ -24,9 +24,9 @@ dependencies:
- yaml
- pytables
- lxml
- powerplantmatching>=0.5.5
- powerplantmatching>=0.5.4
- numpy<1.24
- pandas
- pandas>=1.4
- geopandas>=0.11.0
- xarray
- netcdf4

View File

@ -22,7 +22,7 @@ countries: ['BE']
snapshots:
start: "2013-03-01"
end: "2013-03-08"
closed: 'left' # end is not inclusive
inclusive: 'left' # include start, not end
enable:
prepare_links_p_nom: false