Skip to content
Advertisement

Tag: apache-spark-sql

How to filter multiple rows based on rows and columns condition in pyspark

I want to filter multiple rows based on “value” column. Ex, i want filter velocity from channel_name column where value>=1 & value <=5 and i want filter Temp from channel_name column where value>=0 & value <=2. Below id my Pysaprk DF. start_timestamp channel_name value 2020-11-02 08:51:50 velocity 1 2020-11-02 09:14:29 Temp 0 2020-11-02 09:18:32 velocity 0 2020-11-02 09:32:42 velocity 4

Advertisement