Path: blob/master/03_Grouping/Regiment/Exercises.ipynb
613 views
Kernel: Python 2
Regiment
Introduction:
Special thanks to: http://chrisalbon.com/ for sharing the dataset and materials.
Step 1. Import the necessary libraries
In [ ]:
Step 2. Create the DataFrame with the following values:
In [51]:
Step 3. Assign it to a variable called regiment.
Don't forget to name each column
In [ ]:
Step 4. What is the mean preTestScore from the regiment Nighthawks?
In [ ]:
Step 5. Present general statistics by company
In [ ]:
Step 6. What is the mean of each company's preTestScore?
In [ ]:
Step 7. Present the mean preTestScores grouped by regiment and company
In [ ]:
Step 8. Present the mean preTestScores grouped by regiment and company without heirarchical indexing
In [ ]:
Step 9. Group the entire dataframe by regiment and company
In [ ]:
Step 10. What is the number of observations in each regiment and company
In [ ]:
Step 11. Iterate over a group and print the name and the whole data from the regiment
In [ ]: