QuestionQ33
VerifiedDeveloping Apache Spark™ DataFrame/DataSet API ApplicationsThe code block below includes an error. It is intended to create a Python UDF, assessPerformanceUDF(), from the integer-returning Python function assessPerformance() and apply it to the customerSatisfaction column in DataFrame storesDF. Identify the error.
assessPerformanceUDF – udf(assessPerformance)
storesDF.withColumn("result", assessPerformanceUDF(col("customerSatisfaction")))
Community Discussion