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

drop duplicates for pandas pivots #1147

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Conversation

shapiromatron
Copy link
Owner

@shapiromatron shapiromatron commented Dec 5, 2024

We recently switched from groupby to pivot to improve performance of data frame exports (#1099), but pivots can fail if there are duplicated data in the pivot table. This PR drops duplicates prior to creating the pivot, in the event that there are duplicates.

This was identified in a rare case, where it appears a user entered multiple dosing regime dose groups that all have the same dose units. A subsequent PR will prevent data entry to prevent these issues.

Bonus - upgrade django

@shapiromatron shapiromatron changed the title drop dups drop duplicates for pandas pivots Dec 5, 2024
@shapiromatron shapiromatron marked this pull request as ready for review December 5, 2024 14:11
@shapiromatron shapiromatron merged commit e5ef4dc into main Dec 6, 2024
6 checks passed
@shapiromatron shapiromatron deleted the drop-duplicates-pivot branch December 6, 2024 20:14
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