Merge pull request #648 from PyPSA/misc/deprecations

[DNMY] Address pandas deprecation of date_parser for pandas.read_csv
This commit is contained in:
Fabian Neumann 2024-01-02 09:35:25 +01:00 committed by GitHub
commit ceddecd705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -185,6 +185,8 @@ PyPSA-Eur 0.8.1 (27th July 2023)
(https://github.com/PyPSA/pypsa-eur/pull/672)
* Addressed deprecation warnings for ``pandas=2.0``. ``pandas=2.0`` is now minimum requirement.
PyPSA-Eur 0.8.0 (18th March 2023)
=================================

View File

@ -81,7 +81,7 @@ def load_timeseries(fn, years, countries, powerstatistics=True):
return s[: -len(pattern)]
return (
pd.read_csv(fn, index_col=0, parse_dates=[0])
pd.read_csv(fn, index_col=0, parse_dates=[0], date_format="%Y-%m-%dT%H:%M:%SZ")
.tz_localize(None)
.filter(like=pattern)
.rename(columns=rename)