Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Exploratory Analysis of a Flights Dataset | Section
Introduction to PySpark
Abschnitt 1. Kapitel 11
single

single

Challenge: Exploratory Analysis of a Flights Dataset

Swipe um das Menü anzuzeigen

Aufgabe

Wischen, um mit dem Codieren zu beginnen

You are given a flights dataset as a list of rows. Load it into a DataFrame using createDataFrame and complete the following steps, storing results in the specified variables:

  1. Count the total number of rows – store in total_rows;
  2. Find the airline with the most delayed flights (Delay == 1) – store the airline code as a string in most_delayed_airline;
  3. Count the number of delayed flights (Delay == 1) – store in delayed_count;
  4. Find the top 3 busiest routes (unique AirportFrom + AirportTo pairs by flight count) – store as a list of tuples [(origin, destination, count), ...] in top_routes.

Print all results.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 11
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt