dataframe:
col1
[[0.43], [0.46], [1.0], [0.323]]
[[0.33], [0.66], [1.0], [0.3412]]
[[0.27], [0.42], [0.13], [0.332]]
I'm trying to create a column based on: if there's a number in the nested list of col11 >= .5 then "yes" else "no".
Result:
col1 col2
[[0.43], [0.46], [1.0], [0.323]] yes
[[0.33], [0.66], [1.0], [0.3412]] yes
[[0.27], [0.42], [0.13], [0.332]] no
It would also be good to have a column with the location of where the number was in nested list that was >= .5. for the above df, this would be col3: 3,3,N/A
Thinking something like this:
for i in df.col1:
print(i)
if j in i >= .05:
print(i,"yes")
else:
print(i,"no")