"turn list of categorical variables into (0,1) list","c = np.unique(a, return_inverse=1)[1]"