col1 = data[:, (0)]
col2 = data[:, (1)]
subsets = {}
for val1, val2 in itertools.product(np.unique(col1), np.unique(col2)):
    subset = data[(col1 == val1) & (col2 == val2)]
if np.any(subset):
    subsets[val1, val2] = subset
Subsetting data in python