Skip to content

modified download.py#2076

Open
niveditasing wants to merge 2 commits into
datacommonsorg:masterfrom
niveditasing:commodity_marked_fix
Open

modified download.py#2076
niveditasing wants to merge 2 commits into
datacommonsorg:masterfrom
niveditasing:commodity_marked_fix

Conversation

@niveditasing

@niveditasing niveditasing commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Problem

  • The dwonload.py script was failing so there were three places in the code where .applymap() was changed to .map()

Why?

  • Pandas Deprecation: In Pandas version 2.1.0 and higher, the .applymap() method was deprecated and is scheduled to be removed in future versions.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces deprecated pandas applymap calls with map and ensures exceptions in process_xlsx are re-raised. The review feedback suggests using logging.exception instead of logging.error to preserve the full traceback for easier debugging when an exception is caught and re-raised.

Comment thread statvar_imports/world_bank/commodity_market/download.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant