I have spark dataframe like this

```
id1 id2 attrname attr_value attr_valuelist
1    2  test         Yes      Yes, No
2    1  test1        No       Yes, No
3    2  test2       value1    val1, Value1,value2
4    1  test3         3        0, 1, 2
5    3  test4         0        0, 1, 2
11   2  test         Yes      Yes, No
22   1  test1        No1       Yes, No
33   2  test2       value0    val1, Value1,value2
44   1  test3         11        0, 1, 2
55   3  test4         0        0, 1, 2

val df = sqlContext.sql("select id1, id2, attrname, attr_value, attr_valuelist from dftable)

```

i want to check attr\_value in attr\_valuelist if it does not exists then take only those rows

```
id1 id2 attrname attr_value attr_valuelist
4    1  test3         3        0, 1, 2
22   1  test1        No1       Yes, No
33   2  test2       value0    val1, Value1,value2
44   1  test3         11        0, 1, 2

```