nerdexam
DatabricksDatabricks

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

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Question #108: Real Exam Question with Answer & Explanation

The correct answer is A: 1. withColumnRenamed. See the full explanation below for the reasoning.

Spark DataFrame API

Question

The code block shown below should return a new DataFrame where column division from DataFrame storesDF has been renamed to column state and column managerName from DataFrame storesDF has been renamed to column managerFullName. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. Code block: storesDF. __1__(__2__, __2__).__4__(__5__, __6__)

Options

  • A1. withColumnRenamed
  • B1.withColumnRenamed
  • C1. WithColumnRenamed
  • D1. withColumn
  • E1. withColumn

Topics

#PySpark DataFrames#Column Renaming#DataFrame Transformations

Community Discussion

No community discussion yet for this question.

Full DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK PracticeBrowse All DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Questions