Please suggest how can i achieve string contains on a column in spark dataframe, In pandas i used to do
df1 = df[df['col1'].str.contains('anystring_to_match')]
Try:
df['col1'].like('%anystring_to_match%')
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