Assume the below table is pyspark dataframe and I want to apply filter on a column ind on multiple values. How to perform this in pyspark?
ind group people value
John 1 5 100
Ram 1 2 2
John 1 10 80
Tom 2 20 40
Tom 1 7 10
Anil 2 23 30
I am trying following, but without success
filter = ['John', 'Ram']
filtered_df = df.filter("ind == filter ")
filtered_df.show()
How to achieve this in spark?
infunction/operator.