// Restrict to face and house conditions
conditions = behavioral["labels"]
condition_mask = np.logical_or(conditions == b"face",
conditions == b"house")
// Split data into train and test samples, using the chunks
condition_mask_train = np.logical_and(condition_mask, behavioral["chunks"] <= 6)
condition_mask_test = np.logical_and(condition_mask, behavioral["chunks"] > 6)
After Change
behavioral = pd.read_csv(data_files.session_target[0], delimiter=" ")
// Restrict to face and house conditions
conditions = behavioral["labels"]
condition_mask = conditions.isin(["face", "house"])
// Split data into train and test samples, using the chunks
condition_mask_train = np.logical_and(condition_mask, behavioral["chunks"] <= 6)
condition_mask_test = np.logical_and(condition_mask, behavioral["chunks"] > 6)