Suppose we have a table like the following:
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Say, if I want to find all rows satisfying (col A = 0 and col C = 1). Is there a way to do such query in Mathematica?
The real dataset is 4GB of hundreds of columns and hundreds of thousands of rows consists of strings, integers, and floating numbers, so doing a pattern matching might not be a feasible solution.
The end result should be a list of indices of matching rows.
Position[list, {0, _, 0}]
. $\endgroup$Association
? I think this would be useful for you. As it is, for such large lists, searching in general is a computationally intensive problem. The right data structure helps a lot, I think. $\endgroup$