We provide the solution to this challenge using:
Need a program? Click here.
Your 16-year-old son, Derek, just burst into your office and let you know that his driver’s license came in the mail today. He’s been saving up for a car since age 9, and now that he can legally drive, he’s ready to make the big purchase. Knowing that you are financially savvy and will take his wellbeing into consideration, Derek begs you to help him find the right car.
He tells you that he can afford a $21,000 car, but he hasn’t taken any extra fees into consideration. You’ll need to be mindful of taxes, registration costs, insurance premiums, etc. when forming your opinion. You also know from experience that Derek is a terrible driver, so you plan to prioritize safety ratings. Lastly, Derek is notorious for changing his mind, so it’s possible that he may want a different car a year from now. You’ll want to confirm that the resale value after one year is at least $12,000.
- Download each of the relevant files.
- Join each of the files together into a single data frame for analysis
- Create a new column called “Total_cost” that represents the sum of the cost of the car and any additional fees. Filter out any cars with a total cost greater than $21,000.
- Filter out any cars with a safety rating less than or equal to 4.5.
- Filter out any cars with a resale value less than $12,000.
- Using the Display function, show Derek the car of his dreams.
- File 83a contains the ID, make, and model of each car.
- File 83b contains the ID, pricing, and resale value after one year for each car.
- File 83c contains the ID and safety rating for each car.
Suggestions and Hints
a. Make sure you have the CSV files saved in the same folder as your Python/Jupyter file