1#Binarizer dat nguong dat co 0 va 1
2from pyspark.ml.feature import Binarizer
3df = df.withColumn("List_Day_of_Week",df["List_Day_of_Week"].cast("double"))
4binarizer = Binarizer(threshold=5.0,inputCol="List_Day_of_Week",outputCol="Listed_On_Weekend")
5df = binarizer.transform(df)