我有一个Polars DataFrame:
import polars as pl
import numpy as np
df = pl.DataFrame({'A': ['red', 'blue', 'green', np.nan, 'orange']})
my_list = ['red','orange']
我想知道my_list
有哪些 colored颜色 .
对于Pandas ,我会做一些类似的事情:
df.A.isin(my_list)
但是,我得到了这个错误:
AttributeError: 'DataFrame' object has no attribute 'A'
如何在Polars中做到这一点?