Answers for "binarizer pyspark"

0

binarizer pyspark

#Binarizer dat nguong dat co 0 va 1
from pyspark.ml.feature import Binarizer
df = df.withColumn("List_Day_of_Week",df["List_Day_of_Week"].cast("double"))
binarizer = Binarizer(threshold=5.0,inputCol="List_Day_of_Week",outputCol="Listed_On_Weekend")
df = binarizer.transform(df)
Posted by: Guest on September-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language