Assessment tools with "False" and "True" strings are parsed as boolean, breaking things #107
Closed
2 tasks done
Labels
Epic
A collection of issues that are related by topic and can be addressed together.
When I have an assessment tool column with unique values that look like the python special words for boolean values (i.e. "True" and "False"), then pandas reads the whole column as type boolean. If the "False" value is meant to indicate a
MissingValue
, then this is ignored now, because in the data dictionary it is described as a string, but in the loaded bagel.tsv, it is now abool
.Here is an example of a data dictionary for a column with "True" and "False" values
and here is an example of what the corresponding bagel.tsv file would look like
Then all three subjects (sub-01, sub-02, sub-03) would be shown to "have" the MOCA tool, because none of them would have a "False" value inside of the loaded bagel.tsv (because it got cast into a boolean and
False != "False"
in python).Sneakily, all of this happens completely silently and without any error, because we are not checking whether the values described in the data dictionary actually exist in the loaded bagel.tsv file.
I think two things should be done:
The text was updated successfully, but these errors were encountered: