kasus pyspark kapan

# PYSPARK DATAFRAME API

from pyspark.sql.functions import when

df.select("*",when(df.value == 1, 'one'
            ).when(df.value == 2, 'two'
            ).otherwise('other'))
MelCode