python pandas loc函数 列索引不对齐问题

python pandas loc函数 列索引不对齐问题
问题:pandas.core.indexing.IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match).


   data3 = pd.DataFrame(np.array(task3), index=['123','124','125','126','127','128','129'], columns=['i','status','cost','u','Cil','rtime'])
.......
  j = min(data34['cost'])   #data34是之前设置的表,取data3中的值
    data35 = data31.loc[data34['cost'] == j]
    print(data35)

img


我是根据这个改的,j对应0
其他上面同样这样子使用的输出正确,就有个别表是这样子报错

img


他说我不对齐,可是我输出是对的

img