Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python please, a sample of the file has been provided :) Part 2: .CSV files For Part 2 functions, the .csv file format will
in python please, a sample of the file has been provided :)
Part 2: .CSV files For Part 2 functions, the .csv file format will be as follows (NOTE: there will be a header row at the top of each.csv file) item name item name 1 item name 2 price price 1 price 2 category category 1 category 2 online rating rating 1 rating 2 Be sure to download both of theprovided csv files to the same directory as your Hw07.py file Function name: budget_outfit Parameters: file (.csv file) Returns: dictionary Description: 2019 is a new year, and you want to reflect that by buying new clothes. However, you are on a budget, and you only want to purchase one outfit, which will consist of the lowest-price item in each clothing category. Write a function that takes itn a .csv file and returns a dictionary that maps clothing categories (string) to the name of the lowest-price item in that category (string), as well as the string "total price" to the total price (float) of the whole outfit. It should look something like {category: item name, category: item name, , "total price": total price). Make sure to round the total price to 2 decimal points. Note: You can assume that there will be no ties for lowest-price item in a particular category >>> budget_ outfit("uniqlo.csv") {'outerwear' "puffy jacket', 'tops shorts', total price': 134.7) 't-shirt', 'bottoms': 'denim uniqlo item name price category rating 4 puffy jacket89.9 outerwear4.5 3.9 3.5 4 4.7 4 3.9 4.6 3.3 trench coat 99.9 outerwear sweater tank top polo t-shirt sweatshirt denim shorts29.9 bottoms ankle pants 39.9 bottoms Jeans 29.9 tops 19.9 tops 19.9 tops 14.9 tops 29.9 tops 39.9 bottomsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started