How do we replace missing numeric and string values with custom default values using a dictionary?
fillna() substitutes NULL entries with specified constants, either across all columns or using a column-to-value map.
Imputing missing features for machine learning and ensuring reporting dashboards display clean fallback labels.
df = df.fillna({"age": 0, "status": "UNKNOWN"})Practice typing production-grade PySpark code for Imputing Defaults with fillna().