Handling missing data with fill and drop
Oh my… You have a lot of missing values in this dataset! Let's clean it up! With the loaded CSV file, drop rows with any null values, and show the results!
Remember, there's already a SparkSession called spark in your workspace!
Deze oefening maakt deel uit van de cursus
Introduction to PySpark
Oefeninstructies
- Drop any rows with null values in the
census_dfDataFrame. - Show the resulting DataFrame.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Drop rows with any nulls
census_cleaned = census_df.____
# Show the result
census_cleaned.____