I have a DataFrame consisting of many columns and rows, and each entry being simply 1’s or 0’s. For a particular row, I now want to identify all the columns that contain 1. So, I do the following for the first row:
findall(x->x == 1,data[1,:]))
The result is a Vector(Symbol) containing :x5, :x22, and :x79.
Since my purpose is to use the ids (i.e., the 5, the 22, and the 79) to get information from a related Array, I could do the following instead
ids = findall(x->x == 1,convert(Array,data[1,:]))
So my question is, can I achieve the same effect without “convert”?