Databricks Certified Associate Developer for Apache Spark 3.5-Python Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question # 9 Topic 1 Discussion

Databricks Certified Associate Developer for Apache Spark 3.5-Python Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question # 9 Topic 1 Discussion

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam Topic 1 Question 9 Discussion:
Question #: 9
Topic #: 1

A data scientist has identified that some records in the user profile table contain null values in any of the fields, and such records should be removed from the dataset before processing. The schema includes fields like user_id, username, date_of_birth, created_ts, etc.

The schema of the user profile table looks like this:

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question 9

Which block of Spark code can be used to achieve this requirement?

Options:


A.

filtered_df = users_raw_df.na.drop(thresh=0)


B.

filtered_df = users_raw_df.na.drop(how='all')


C.

filtered_df = users_raw_df.na.drop(how='any')


D.

filtered_df = users_raw_df.na.drop(how='all', thresh=None)


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.