Noos
PT EN
RAN-DBDEA-00217
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: easy

A gold orders table feeds a dashboard that averages the rating column, and stakeholders want missing ratings to count as 0 instead of NULL. The engineer preparing the aggregation must keep every order row in the output while making each NULL rating read as 0. Which PySpark operation achieves this?

Options (Reading Mode) Click to filter discussion →
  1. A. dropna() on rating — removing the rows where rating is NULL keeps the dashboard free of missing values entirely
  2. B. fillna(0) on rating — it drops the rows whose rating is NULL, so only genuinely rated orders remain in the output
  3. C. Registering a Python UDF — no built-in DataFrame operation can substitute a constant for NULL values in a column
  4. D. fillna(0) on rating — it replaces each NULL rating with 0 while keeping every order row in the DataFrame
Reveal answer

Correct answer: fillna(0) on rating — it replaces each NULL rating with 0 while keeping every order row in the DataFrame

Reference: https://docs.databricks.com/aws/en/pyspark/reference

02 — The Myelin Layer · Canonical Discussion

Where the exam tries to trick you — and how those who passed solved it.

0 Passed

contributed to this question

Answer Distractor Matrix Click an option to filter or open its dissection.
✦ Consolidated Synthesis (Wiki) rev. #1 (baseline) · CC BY-SA 4.0
Start synthesis for this question →

No community synthesis consolidated for this question yet. Below is the verifiable official starting point — if you passed the exam, open the option dissection.

Official Answer (D): fillna(0) on rating — it replaces each NULL rating with 0 while keeping every order row in the DataFrame

⚓ Official Documentation Anchor: https://docs.databricks.com/aws/en/pyspark/reference
Ranvier · DBDEA

Contribute to this Question

Your contribution builds your Orbital Sheath

Peer contributions

No public contribution yet. Be the first who passed to explain why the distractors trick candidates — your contribution builds your Orbital Sheath.