CSV to DataFrame
You work for an airline, and your manager has asked you to do a competitive analysis and see how often passengers flying on other airlines are involuntarily bumped from their flights.
You got a CSV file (airline_bumping.csv
) from the Department of Transportation containing data on passengers that were involuntarily denied boarding in 2016 and 2017, but it doesn't have the exact numbers you want. In order to figure this out, you'll need to get the CSV into a pandas DataFrame and do some manipulation!
pandas
is imported for you as pd
. "airline_bumping.csv"
is in your working directory.
This exercise is part of the course
Data Manipulation with pandas
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Read CSV as DataFrame called airline_bumping
airline_bumping = ____
# Take a look at the DataFrame
print(____)