-
Notifications
You must be signed in to change notification settings - Fork 8
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 nan #81
base: main
Are you sure you want to change the base?
fix nan #81
Conversation
for more information, see https://pre-commit.ci
Looks good! |
reproschema/redcap2reproschema.py
Outdated
@@ -420,7 +420,15 @@ def process_row( | |||
# ) | |||
|
|||
elif key in ADDITIONAL_NOTES_LIST and value: | |||
notes_obj = {"source": "redcap", "column": key, "value": value} | |||
# Convert value to string, handling NaN explicitly | |||
value_str = "NaN" if pd.isna(value) else str(value).strip() |
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.
do we really want to do this or skip nans?
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.
good question. so in the b2ai case, what happens when we have "value": NaN
? @ibevers what do you mean by "Items that have NaN in them don't work in reproschema-ui." they won't appear in the UI or they can't proceed to the next one?
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.
You can't proceed @yibeichan
i left some suggestions, but we also need to check for |
Co-authored-by: Satrajit Ghosh <satrajit.ghosh@gmail.com>
Co-authored-by: Satrajit Ghosh <satrajit.ghosh@gmail.com>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
we made changes to handle "nan" when converting from redcap to reproschema; however, we are failing |
regarding this issue
sensein/b2ai-redcap2rs#5