Open rbyh opened 3 months ago
Perhaps we could add an optional parameter to print()
?
results.select("answer.*").print(format="rich, question_text_headers=True)
You might also want to use the question_names.
So I think I have a solution - we're going to re-factor ScenarioList + Dataset so that each has an optional 'codebook' entry. @rbyh this is used, for example, when you do the "valid identifier" conversion for a ScenarioList but I'm not currently serializing this. This codebook would let us, say, do more sophisticated printing things such as replace the columns with question_text without tediously re-writing them. Right now, the problem is when you get to a 'print' the Dataset in question doesn't know it came from a Result object, for example.
@apostolosfilippas - this would mean adding a new field to both ScenarioList and Dataset objects. I know we don't serialize/store Datasets, so no issue there, but for ScenarioList, this would be a breaking change. That being said, it's an optional parameter.
Bumping this. Eg, we should make this work (it does not):
Currently it is not possible to use
question_text
as apretty_label
when there is no question id -- eg, for any survey created usingConjure
.This is the typical way to do it:
But if there is no question id it is not possible -- eg this does not work:
This does not work either: