New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Databricks Certified Associate Developer for Apache Spark 3.5 – Python Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question # 37 Topic 4 Discussion

Databricks Certified Associate Developer for Apache Spark 3.5 – Python Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question # 37 Topic 4 Discussion

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam Topic 4 Question 37 Discussion:
Question #: 37
Topic #: 4

12 of 55.

A data scientist has been investigating user profile data to build features for their model. After some exploratory data analysis, the data scientist identified that some records in the user profiles contain NULL values in too many fields to be useful.

The schema of the user profile table looks like this:

user_id STRING,

username STRING,

date_of_birth DATE,

country STRING,

created_at TIMESTAMP

The data scientist decided that if any record contains a NULL value in any field, they want to remove that record from the output before further processing.

Which block of Spark code can be used to achieve these requirements?


A.

filtered_users = raw_users.na.drop("any")


B.

filtered_users = raw_users.na.drop("all")


C.

filtered_users = raw_users.dropna(how="any")


D.

filtered_users = raw_users.dropna(how="all")


Get Premium Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.