Skip to content

Replace deprecated DataFrame.applymap() with map()#1767

Merged
SFJohnson24 merged 1 commit into
cdisc-org:mainfrom
filippsatverily:filipps/pandas3-remove-df.applymap
Jun 22, 2026
Merged

Replace deprecated DataFrame.applymap() with map()#1767
SFJohnson24 merged 1 commit into
cdisc-org:mainfrom
filippsatverily:filipps/pandas3-remove-df.applymap

Conversation

@filippsatverily

@filippsatverily filippsatverily commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Replaces DataFrame.applymap() with DataFrame.map() across all data readers and the dummy data service. applymap() was deprecated in pandas 2.1.0 and removed in pandas 3.0; this change resolves 12 FutureWarning instances on a full run of unit tests runs (157 → 145 warnings).

Tested scenarios:

  • Full pytest suite: 1745 passed, 11 skipped, 0 failed (pandas 2.3.3, dask 2025.12.0)
  • Ran validation on CDISC_Pilot_Study_v4_FIXED.json: 201 SUCCESS, 6 SKIPPED, 0 errors

@filippsatverily filippsatverily marked this pull request as ready for review June 18, 2026 20:39
@filippsatverily

Copy link
Copy Markdown
Contributor Author

@SFJohnson24 please see the first of 8 commits for the pandas 3 upgrade. I'm breaking down the huge #1745 for better readability and separation of concerns in case of regressions.

@SFJohnson24 SFJohnson24 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this PR correctly updates applymap calls to map() across several locations, ensuring compatibility with pandas 3.0 where applymap was removed.

test suite ran correctly on my branch where I fetched the code: #1771
also got same result with pilot study.

@SFJohnson24 SFJohnson24 merged commit 25c64ae into cdisc-org:main Jun 22, 2026
11 checks passed
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.

2 participants