Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix 485 depcreation pandasdataframeapplymap #491

Merged
merged 7 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading