I can filter - as per below - tuples in an RDD using "contains". But what about filtering an RDD using "does not contain" ?
val rdd2 = rdd1.filter(x => x._1 contains ".")
I cannot find the syntax for this. Assuming it is possible and that I'm not using DataFrame
s. I cannot see from how to do it with regex and/or filter examples.
It's just the negation of the contains
filter predicate :
val rdd2 = rdd1.filter(x => !(x._1 contains "."))
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