I have imported some survey responses into a Dataset. I now want to select those rows where the response to "participant type" == "Virtual". I discovered that this works:

dataSet[Select[#[[2]] == "Virtual" &]]

But I want to know if there is anyway to say #participant type, instead of #[[2]].


closed as off-topic by MarcoB, Henrik Schumacher, m_goldberg, Carl Lange, bbgodfrey Mar 21 at 11:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Henrik Schumacher, m_goldberg, Carl Lange, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ Use #"participant type" $\endgroup$ – Carl Woll Mar 19 at 18:56
  • 2
    $\begingroup$ Or #[["participant type"]] will also work. $\endgroup$ – Carl Lange Mar 19 at 21:31
  • $\begingroup$ Thank you both. I discovered that my previous attempts to implement Carl Woll's solution failed because I cut and paste the text into the formula. It looks like there is a bug in the parsing when one does that. However, typing the text gets round the problem. $\endgroup$ – Andy Burnett Mar 20 at 0:24