Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
Which code block will produce a DataFrame with the schema containing "customer_id" as LONG type and "predictions" as DOUBLE type, given that:
A
df.map(lambda x:model(x[columns])).select("customer_id, predictions")
B
df.select("customer_id", model(*columns).alias("predictions"))
C
model.predict(df, columns)
D
df.select("customer_id", pandas_udf(model, columns).alias("predictions"))
E
df.apply(model, columns).select("customer_id, predictions")