I have a list structured like
list1 = {{"header1","header2","header3"},
{0,1,2}};
and I'm using a custom function to find the number of the column with a specific header name, and then extract the data for this column:
header = "header1"
data = Map[Part[#,All,whatColumn[header]] &,list1];
Now let's say I would like to extract data for both column "header1" and "header2", I would need to Map the above code line on the following list:
list2 = {"header1", "header2"};
but how do I organize my placeholders # ?
Something like this doesn't seem to work:
data = Map[Map[Part[#2,All,whatColumn[#1]] &,list1] &, list2];
Part[list1, All, 2]
extracts 2nd column, andMap[Part[list1, All, #] &, {1, 3}]
both 1st and 3rd. $\endgroup$