Skip to content

fix: replace inplace=True mutation (pandas 3.0 CoW)#1772

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

fix: replace inplace=True mutation (pandas 3.0 CoW)#1772
SFJohnson24 merged 1 commit into
cdisc-org:mainfrom
filippsatverily:filipps/pandas3-remove-inplace-mutation

Conversation

@filippsatverily

@filippsatverily filippsatverily commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Replaces row.reset_index(drop=True, inplace=True) with row = row.reset_index(drop=True) in next_column_exists_and_previous_is_null. Pandas 3.0 enforces Copy-on-Write, which makes inplace=True on a row (a view of the DataFrame) silently fail instead of modifying the data. This doesn't produce warnings on pandas <3.0 but will break at runtime on pandas 3.0.

Tested scenarios:

  • Full pytest suite: 1746 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 22, 2026 18:27
@filippsatverily

Copy link
Copy Markdown
Contributor Author

@SFJohnson24 see next commit for pandas 3 upgrade from #1745

@SFJohnson24 SFJohnson24 merged commit 4eefdd9 into cdisc-org:main Jun 22, 2026
17 of 19 checks passed

@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.

passes test suite (#1773), high level review, and testing

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