pandas#1789
Merged
Merged
Conversation
RamilCDISC
reviewed
Jun 29, 2026
| .groupby(self.params.grouping, as_index=False, group_keys=False) | ||
| .data[self.params.target] | ||
| .apply(list) | ||
| .apply(_apply_dropna_list) |
Collaborator
There was a problem hiding this comment.
Before the grouped path used .apply(list) which would preserve the missing values but _apply_dropna_list drops them. If this is intentional then the ungrouped non reference path still uses data = result[self.params.target].unique() and then result = list(data) which preserves the missing values in the list. The distinct operation will have two different behaviors then. Please let me know if I misunderstanding something here.
Collaborator
Author
There was a problem hiding this comment.
made them have parity
RamilCDISC
approved these changes
Jun 30, 2026
RamilCDISC
left a comment
Collaborator
There was a problem hiding this comment.
The PR is one of the last changes for pandas 3.0 compatibility. The PR updates the Distinct operation and updates pandas version in the tests.The PR was validated by:
- Reviewing the PR for any unwanted code or comments.
- Reviewing the PR in accordance to AC.
- Reviewing the updated operation for consistency throughout its different return paths.
- Ensuring all unit and regression tests pass.
- Ensuring pandas version update does not break any CI check.
- Ensuring pandas version update does not cause any regressions.
gerrycampion
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
per @filippsatverily Removes the last remaining upper-bound version cap. All pandas 3.0 compatibility fixes are now on main (#1767, #1772, #1774, #1776, #1777, #1782, #1786).
I had to add some extra changes to preserve behavior in 2 operations:
day_data_validator.py, explicitly cast columns toobjecttype before mapping timestamp parsing functions, ensuring compatibility withpandas3 and preventing type casting-related issues. [1] [2]distinct.py, replaced directlistconversion with a new_apply_dropna_listfunction to removeNaNvalues before collecting unique values, addressing changes in howpandas3 handles missing data in groupby operations. [1] [2]