DataFrame to CSV
You're almost there! To make things easier to read, you'll need to sort the data and export it to CSV so that your colleagues can read it.
pandas as pd has been imported for you.
This exercise is part of the course
Data Manipulation with pandas
Exercise instructions
- Sort
airline_totalsby the values ofbumps_per_10kfrom highest to lowest, storing asairline_totals_sorted. - Print your sorted DataFrame.
- Save the sorted DataFrame as a CSV called
"airline_totals_sorted.csv".
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create airline_totals_sorted
airline_totals_sorted = ____
# Print airline_totals_sorted
____
# Save as airline_totals_sorted.csv
____