In: Computer Science
Python.
Create a function that receives the name of an auto maker and returns a slice of the dataframe with the cars from that auto maker. For instance, it may receive 'ford' and return a slice with all the cars produced by 'ford' meaning they have 'ford' in their name. Call the function for 'ford' to see if it works properly.
Hint: You may create a list comprehension producing a list of all the index labels that include the auto-maker's name inside them. Then you feed this list to .loc[ ] to slice for those index labels.
I hope below code will serve the purpose:
If you have any doubt, please let me know by commenting below.