Question: I have the data frame called 'Top_Chef' that has the columns 'season', contestant id', 'full name', and ' contestant age'. I want to make a

I have the data frame called 'Top_Chef' that has the columns 'season', contestant id', 'full name', and ' contestant age'. I want to make a data frame called Q1 that bins the contestant ages (their age when they were on the season, not their current age) into the following age categories:

  • 18-24
  • 25-34
  • 35-44
  • 45-54
  • 55-64
  • 65+

The final data frame should have the following columns in this order: season, contestant id, full name, age, and age category. The data frame should be sorted by age and then contestant id. The index should be 0 through n-1.

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 Mathematics Questions!