Question: i don't how to how to do these tasks here how I have gotten so far? At the first task, I don't know how to


i don't how to how to do these tasks here how I have gotten so far?
At the first task, I don't know how to sort so can you tell me what is the code?
Your program must be able to store individual products (given with StockCode and Description) from csv file and insert it into a suitable data structure (you can use any python data type to store the products and the details (i.e. Stock Code, Quantity, Price)). 2. Tasks After reading and processing is over, your program must produce required outputs as given in tasks below. . top 10 products ordered by individuals. top 10" customers who spent the most money. ers\yaznk\OneDrive\Desktop\Python project\Python project\python project 2.py. - Sublime Text (UNREGISTERED) sit Selection Find View Goto Tools Project Preferences Help python project 2.py import pandas as pd # import pandas library from collections import Counter # import counter from collections library B 4 df_xlsx pd.read_excel('online_retail.xlsx') #read from xlsx file and return data as dataframe 5 6 #print(df_xlsx.loc[@]) Data_list df_xlsx.values.tolist() # save data from dataframe to 2D list (Data_list) 8 #print (Data_list) 9 StockCode [i[1] for i in Data_list] # 1d list of stockcode 10 11 12 # Calucate top 10 product oredered by individuals 13 dict(Counter(StockCode)) # counting repetion of each stockcode 14 print (a) 15 a = Your program must be able to store individual products (given with StockCode and Description) from csv file and insert it into a suitable data structure (you can use any python data type to store the products and the details (i.e. Stock Code, Quantity, Price)). 2. Tasks After reading and processing is over, your program must produce required outputs as given in tasks below. . top 10 products ordered by individuals. top 10" customers who spent the most money. ers\yaznk\OneDrive\Desktop\Python project\Python project\python project 2.py. - Sublime Text (UNREGISTERED) sit Selection Find View Goto Tools Project Preferences Help python project 2.py import pandas as pd # import pandas library from collections import Counter # import counter from collections library B 4 df_xlsx pd.read_excel('online_retail.xlsx') #read from xlsx file and return data as dataframe 5 6 #print(df_xlsx.loc[@]) Data_list df_xlsx.values.tolist() # save data from dataframe to 2D list (Data_list) 8 #print (Data_list) 9 StockCode [i[1] for i in Data_list] # 1d list of stockcode 10 11 12 # Calucate top 10 product oredered by individuals 13 dict(Counter(StockCode)) # counting repetion of each stockcode 14 print (a) 15 a =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
