Секція 1. Розділ 4
single
Challenge: Cleaning a Real-World Dataset
Свайпніть щоб показати меню
Завдання
Проведіть, щоб почати кодувати
You are given a flights dataset as a list of rows. Load it into a DataFrame using createDataFrame and clean it using the techniques from the previous chapters. Store results in the specified variables:
- Count how many rows have null
Delayin the original dataset – store innull_delay_count; - Fill nulls in
DelayandLengthwith0– store the cleaned DataFrame incleaned_df; - Remove duplicate rows based on
Airline,Flight, andDayOfWeek– updatecleaned_df; - Add a
TimeOfDaycolumn:"morning"ifTime < 720, otherwise"afternoon"– updatecleaned_df; - Count the number of rows in
cleaned_df– store incleaned_count.
Print all results.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат