Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
 
PREVIOUS NEXT
Tagged: #binarizer #pyspark
ADD COMMENT
Topic
Name
6+6 =