I hope I'm stupid and it will be easy.
I have a dataframe containing the columns 'url' and 'referrer'.
I want to extract all referrers that contain the top-level domain "www.mydomain.com" and "mydomain.co".
I can use
val filteredDf = unfilteredDf.filter(($"referrer").contains("www.mydomain."))
However, this pulls out the URL of the URL www.google.co.uk, which for some reason also contains my web domain. Is there a way using scala in a lawsuit so that I can filter anything using google in it while maintaining the correct results?
thanks
Dean
source share