Skip to content

Commit

Permalink
Merge pull request #491 from OpenEnergyPlatform/bugfix-485-depcreatio…
Browse files Browse the repository at this point in the history
…n-pandasdataframeapplymap

Bugfix 485 depcreation pandasdataframeapplymap
  • Loading branch information
FlorianK13 authored Mar 28, 2024
2 parents 7728eb4 + a051050 commit e9aa3d8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# own testing files
tmptest.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and the versioning aims to respect [Semantic Versioning](http://semver.org/spec/
### Changed
- Fix and add URLs of example projects in readme [#481](https://github.com/OpenEnergyPlatform/open-MaStR/pull/481)
- No longer require web scraping for bulk download [#488](https://github.com/OpenEnergyPlatform/open-MaStR/pull/488)
- Replace deprecated pandas map function [#491](https://github.com/OpenEnergyPlatform/open-MaStR/pull/491)
- Fix the handling of corrupted xml syntax in the downloaded files [#494](https://github.com/OpenEnergyPlatform/open-MaStR/pull/494)
### Removed

Expand Down
2 changes: 1 addition & 1 deletion open_mastr/xml_download/utils_cleansing_bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def replace_mastr_katalogeintraege(
.apply(lambda x: x.str.strip())
.replace("", None)
.astype("Int64")
.applymap(katalogwerte.get)
.map(katalogwerte.get)
.agg(lambda d: ",".join(i for i in d if isinstance(i, str)), axis=1)
.replace("", None)
)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
],
python_requires=">=3.8, <4", # 3.8 is needed for pandas 1.4
install_requires=[
"pandas>=1.4", # pandas 1.4 is needed for pd.read_xml
"pandas>=2.1", # pandas 2.1 is needed for dataframe.map()
"numpy",
"sqlalchemy",
"psycopg2-binary",
Expand All @@ -68,6 +68,7 @@
"mkdocs-material",
"mkdocs-include-markdown-plugin",
"mike",
"black",
]
},
package_data={
Expand Down

0 comments on commit e9aa3d8

Please sign in to comment.