nerdexam
DatabricksDatabricks

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

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

The correct answer is E: storesDF.na.fill(30000, "sqft"). See the full explanation below for the reasoning.

Handling Missing Data in Spark DataFrames

Question

Which of the following code blocks returns a new DataFrame where column sqft from DataFrame storesDF has had its missing values replaced with the value 30,000? A sample of DataFrame storesDF is below:

Options

  • AstoresDF.na.fill(30000, Seq("sqft"))
  • BstoresDF.nafill(30000, col("sqft"))
  • CstoresDF.na.fill(30000, col("sqft"))
  • DstoresDF.fillna(30000, col("sqft"))
  • EstoresDF.na.fill(30000, "sqft")

Topics

#Spark DataFrame API#Missing Values#Data Cleaning#na.fill

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