Question: For this task, you will use a dataset on airline routes. The data dictionary / glossary for this dataset is as follows: S _ CITY:

For this task, you will use a dataset on airline routes. The data dictionary/glossary for this dataset is as follows:
S_CITY: Starting City.
E_CODE: Destination Airport Code.
E_CITY: Destination City.
COUPON: Number of coupons for the flight (a leg is a part of the trip covered by one flight number).
NEW: A variable indicating whether an airline recently started serving this route.
VACATION: A binary variable indicating whether this is a vacation destination.
SW: Southwest Airlines indicator, a binary variable.
HI: Herfindahl Index - a measure of market concentration.
S_INCOME: Starting city's average income.
E_INCOME: Destination city's average income.
S_POP: Starting city's population.
E_POP: Destination city's population.
SLOT: Controlled (or slot controlled) airport indicator, a binary variable.
GATE: Gate controlled airport indicator, a binary variable.
DISTANCE: Distance between the starting city and the destination city in miles.
PAX: Number of passengers on the flight.
FARE: Average fare for the flight.
a) Read in this dataset as df, keeping only the following columns:
VACATION
S_INCOME
E_INCOME
GATE
DISTANCE
b) Print the first five and the last five rows.
c) Print the column names of df.
d) Print the data type and the count of non-null values for each column.
e) Print summary statistics of all numeric columns in the dataset. Interpret the output.
f) Print the percentage of observations belonging to each Gate type

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!