Ensure Answer Option Labels can be casted to the target type of the corresponding Question
When parsing an answer that is one of a set of predefined answer options, the following happens:
- Look up the answer in the CSV → yields
"A001"
- Look up the answer options of the question if there is an option with ID
"A001"
→ yields"0"
- If there is such an Answer Option, cast the
label
of this option to the questions' target data type → yields0
The resulting data is then stored as the answer in the Question to be later exposed e.g. in a pandas data frame.
To make sure that step 3 does not fail, it is essential that the label of an answer can be converted to the target data type.
The alternative would be to introduce a dedicated field that regulates how to convert the data.