Question 5 (10 pts):
• Sort nfl by Age in descending order and store it as a new variable old2young.
• Then, store the first eleven rows of old2young in a new variable first_eleven.
[59]: # Write your code below.
old2young=nfl.sort(key=len)
[60]: # Check your answers here
#display(old2young); display(first_eleven)
Question 6 (10 pts + 5 bonus points):
• Subset the rows for "Rookie" players (based on the "Experience" column) and then store them in a new DataFrame named rookies.
• Subset the rows for Carolina Panthers rookies (based on the "Current Team" and "Experience" columns), and then store them in a new DataFrame named panthers_rookies. Hint: All
rookies have the value "Rookie" in the "Experience" column.
• (Bonus Question) From the nfl data frame, select the columns Age, College, Current Team, and Name (in this order) for players who are 25 or younger and played college football
for "North Carolina-Charlotte" (49ers) or "North Carolina" (Tar Heels) teams. Store the selection in a variable named my_selection.
[61]: # Write your code below.
[62]: # Check your answers here
#display(rookies); display(panthers_rookies)
#display(my_selection)