Python Exit While Loop When Condition In Pyspark Dataframe