i have created a data frame like this:
d = {"one":[1,2,3],"two":[[["c",3],["a",4]],["b",5],["a",6]]}
pd.DataFrame(d)
My question is: how do i filter out a new data frame that column "two" contains only "a"

This should do it for you :
df.loc[df["two"].astype(str).str.contains("a")]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With