不要
list在单元格中使用,这会给您带来很多问题
pandas。如果确实需要一
object列,请使用
tuple:
df.A.map(tuple).isin([(1,2)])Out[293]: 0 True1 False2 FalseName: A, dtype: bool#df[df.A.map(tuple).isin([(1,2)])]

不要
list在单元格中使用,这会给您带来很多问题
pandas。如果确实需要一
object列,请使用
tuple:
df.A.map(tuple).isin([(1,2)])Out[293]: 0 True1 False2 FalseName: A, dtype: bool#df[df.A.map(tuple).isin([(1,2)])]