熊猫数据框的条件追加列表

我正在使用以下代码来尝试过滤特定行,但出现一条错误消息:

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)