Filtering rows that does not contain a string
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020 03:23 AM
search = search.filter(!F.col("Name").contains("ABC"))
search = search.filter(F.not(F.col("Name").contains("ABC"))
Both methods fail due to syntax error could you please help me filter rows that does not contain a certain string in pyspark.
^ SyntaxError: invalid syntax
Labels:
- Labels:
-
Filter