Spark 2.2 onwards
df.filter(df.location.contains('google.com'))Spark 2.2 documentation link
Spark 2.1 and before
You can use plain SQL in
filterdf.filter("location like '%google.com%'")or with DataFrame column methods
df.filter(df.location.like('%google.com%'))Spark 2.1 documentation link