I am using the following code to attempt to filter our specific rows but I am getting an error that says:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
df = pd.DataFrame(rdataset)
plane = 'axial'
contrast = 'T1'
a = []
for slices in range(0,60):
if df['nSlices']==slices: #---------------> Problem here ?
path = df.loc[df['nSlices'].eq(slices) & df['Orient'].eq(plane) & df['Contrast'].eq(contrast),'Path'].tolist()
a.append(path)