报错如下:
File “/root/anaconda3/lib/python3.6/site-packages/pandas/core/ops.py”, line 1676, in wrapper
raise ValueError("Can only compare identically-labeled "
ValueError: Can only compare identically-labeled Series objects
代码:
a = c[c["m"]==sample["d"]]
原因:
sample[“d”]得到的是一个series object
解决:
a = c[c["m"]==sample["d"].squeeze()]