Секція 1. Розділ 4
single
Challenge: Building a Feature Pipeline for Customer Data
Свайпніть щоб показати меню
Завдання
Проведіть, щоб почати кодувати
You are given a flights dataset as a list of rows. Load it into a DataFrame using createDataFrame and apply the encoding and scaling techniques from the previous chapters. Store results in the specified variables:
- Fill nulls in
DelayandLengthwith0; - Apply
StringIndexertoAirline– store the result in a columnAIRLINE_IDX; - Apply
OneHotEncodertoAIRLINE_IDX– store the result in a columnAIRLINE_VEC; - Assemble
Length,Time, andAIRLINE_IDXinto a vector columnFEATURES_RAW; - Apply
StandardScalerwithwithMean=TrueandwithStd=TruetoFEATURES_RAW– store the result inFEATURES_SCALED; - Store the final DataFrame in
features_dfand count its rows infeatures_count.
Print features_count and show all rows of Airline, AIRLINE_VEC, FEATURES_SCALED.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат