Python Exit While Loop When Condition In Pyspark Sql Into Dataframe