-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FIX] Remove requirement for equal {participants x sessions} across pipelines/assessments #144
Conversation
- handle duplicate entries using pivot_table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alyssadai! I have not tested this locally, but the code makes sense to me! If you'd like me to test it, could you provide some files to try the new functionality out with?
I left some comments, otherwise looks 🧑🍳
Thanks for your comments @surchs! I've made some additional changes including reverting back to using Let me know if the changes/comments make sense 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, thanks @alyssadai !
🧑🍳
Changes proposed in this pull request:
pivot
ing the long-format input to wide, pandas will simply create empty cells for any combinations that do not exist in the original data, which we think is fine for nowSwitched to using a method for reshaping the long input data to wide (pd.pivot
->pd.pivot_table
) that has finer control over the aggregation method when there are duplicates, and values used to fill missing values in the resulting pivoted tablepd.pivot
due to known problems withpd.pivot_table
silently droppingNaN
spivot_table
could theoretically handle this by keeping only the first occurrence in the resulting pivoted table, but this is not intuitive and may mean relevant data is lost - rather, we probably want to flag and tell users to fix duplicate observations)Checklist
This section is for the PR reviewer
[ENH]
,[FIX]
,[REF]
,[TST]
,[CI]
,[MNT]
,[INF]
,[MODEL]
,[DOC]
) (see our Contributing Guidelines for more info)Closes #XXXX
For new features:
For bug fixes: