How to create a dataframe outof an existing dataframe based on two values in Pyspark : I've one datafrema and I want to create another dataframe based on some column values using pyspark.
For example : below is my main dataframe -

    Part1	Part2	Part3	Part4
    aaa	     up	     24	    k-123
    bbb	    down	 45	    i-98
    ccc	    down	 54	    k-89
    fff	    int	     23	    l-34
    xyz	     up	     22	    o-89
    www	     up	     89	    u-56

Now, I want to create another dataframe which will search for 1st occurrence of 'down' and will go till 1st occurrence of up. So, the expected dataframe would be :

       Part1	Part2	Part3	Part4
        bbb	    down	 45	    i-98
        ccc	    down	 54	    k-89
        fff	    int	     23	    l-34
        xyz	     up	     22	    o-89
        