DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK · Question #8
DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Question #8: Real Exam Question with Answer & Explanation
Sign in or unlock DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK to reveal the answer and full explanation for question #8. The question stem and answer options stay visible for context.
Question
Which of the following code blocks returns a new DataFrame with column storeDescription where the pattern "Description: " has been removed from the beginning of column storeDescription in DataFrame storesDF? A sample of DataFrame storesDF is below:
Options
- AstoresDF.withColumn("storeDescription", regexp_replace(col("storeDescription"), "^Description:
- BstoresDF.withColumn("storeDescription", col("storeDescription").regexp_replace("^Description: ",
- CstoresDF.withColumn("storeDescription", regexp_extract(col("storeDescription"), "^Description: ",
- DstoresDF.withColumn("storeDescription", regexp_replace("storeDescription", "^Description: ", ""))
- EstoresDF.withColumn("storeDescription", regexp_replace(col("storeDescription"), "^Description: ",
Unlock DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK to see the answer
You've previewed enough free DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK questions. Unlock DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.