Question: Question 40 Line 11 of the code below tells Python to loop through the values in NegSubCats. 3 import pandas as pd 4xl - pd.ExcelFile(osSalesData.xlsx)
Question 40 Line 11 of the code below tells Python to loop through the values in NegSubCats. 3 import pandas as pd 4xl - pd.ExcelFile("osSalesData.xlsx") 5 lines = "-"*25 + " " 6 SalesData = xl.parse("Orders") 7 8 ProductData - SalesData[["Sub-Category", "Product Name", "Profit"]] 9 NegSubcats = ["Tables", "Bookcases", "Supplies"] 10 11 for subcat in NegSubCats: 12 Product Info - ProductData.loc[ProductData[ "Sub-Category"]-- subcat] ProdProfit - Product Info.groupby (by - "Product Name"). sum().round().sort_values (by - "Profit") print(subcat) 15 print(ProdProfit) print(lines) 13 16 True o False * Previous Quiz saved at 10:12 am
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
