nerdexam
DatabricksDatabricks

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK · Question #6

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Question #6: 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 #6. The question stem and answer options stay visible for context.

Perform DataFrame Column Transformations

Question

Which of the following code blocks returns a DataFrame where column storeCategory from DataFrame storesDF is split at the underscore character into column storeValueCategory and column storeSizeCategory? A sample of DataFrame storesDF is displayed below:

Options

  • A(storesDF.withColumn("storeValueCategory", split(col("storeCategory"), "_")[1])
  • B(storesDF.withColumn("storeValueCategory", col("storeCategory").split("_")[0])
  • C(storesDF.withColumn("storeValueCategory", split(col("storeCategory"), "_")[0])
  • D(storesDF.withColumn("storeValueCategory", split("storeCategory", "_")[0])
  • E(storesDF.withColumn("storeValueCategory", col("storeCategory").split("_")[1])

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.

Topics

#DataFrame Transformations#String Functions#Column Operations#PySpark
Full DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK PracticeBrowse All DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Questions