Pyspark: filter dataframe by regex with string formatting?

后端 未结 3 1689
长发绾君心
长发绾君心 2021-02-01 06:35

I\'ve read several posts on using the \"like\" operator to filter a spark dataframe by the condition of containing a string/expression, but was wondering if the following is a \

3条回答
  •  情话喂你
    2021-02-01 06:48

    Try rlike function as mentioned below.

    df.filter( rlike "")
    

    for example.

    dk = dx.filter($"keyword" rlike "")
    

提交回复
热议问题