Answered step by step
Verified Expert Solution
Link Copied!

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 :)image text in transcribedimage text in transcribed

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 bottoms

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 3 Lnai 9853

Authors: Bettina Berendt ,Bjorn Bringmann ,Elisa Fromont ,Gemma Garriga ,Pauli Miettinen ,Nikolaj Tatti ,Volker Tresp

1st Edition

3319461303, 978-3319461304

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

Why do mergers and acquisitions have such an impact on employees?

Answered: 1 week ago

Question

2. Describe the functions of communication

Answered: 1 week ago