F01.justanswer.com



TitleAssignment Project - Due 12/13DueDec 13, 2019 11:55 PMNumber of resubmissions allowed0StatusNot StartedGrade ScalePoints (max 100.00)Note: Submits each code snippets with a screenshot separately in the assignment TABProject OneWrite a Python script that once again starts with the attached reviews.csv file and, after replacing the -1 values by pandas Nan (as you had done in Assignments 9), accomplishes the following --Appends a new column to reviews.csv called 'NK Category' whose values are to be derived from the 'Negative Keywords' column as follows:?Negative-KeywordsNKCategory0-2Low3-5Medium>5HighGenerates the following output (including summary statistics for variables past ROOMS not visible in the screenshot below):This is an example of Binning :‘Binning’ Using the pandas .cut functionThe following brief example demonstrates how to append a new categorical variable/column called ‘Age Category’ to an existing data array, based on the values of an existing column called ‘Age’. The name of the array containing all these columns is ‘my_array’.>> import pandas as pd>> category_boundaries= [-float("inf"),12,19,29,39,49,59,float("inf")]>> category_names=[‘Child’,’Teenager’,’Under-30’, ‘Under-40’, ‘Under-50’, ‘Under-60’,’Senior Citizen’]>> my_array[‘Age Category'] = pd.cut(my_array[‘Age’], bins=category_boundaries, labels=category_names)Project TwoInstructionsThis assignment requires you to start with the attached Microsoft Access database 'Northwind.accdb,' create an Access query based on three tables in this database, save your query as a text file, and then write a Python script to read this text file and output a cross-tabulation of two variables in this text file.The specifics are as follows.Open Northwind.accdb in Microsoft Access.?Create and save a new query called 'INSS_612_query' based on the following tables and fields in the database --From 'Orders'Order DateOrder IDFrom 'Customers'CompanyFrom 'Order Details'Product IDQuantityUnit Price?Export and save INSS_612_query as a text file.?Use your existing Python knowledge as well as fresh research on the pandas crosstab function to generate a cross-tabulation of sales quarter vs. customer company, with number of products sold (not quantities) showing in each cell. For example, if company Y purchased 16 units of product 7, 2 units of product 81, and 11 units of product 40 in Feb 2006, plus 6 units of product 7 in Mar 2006, then the cell entry at the intersection of 1st quarter 2006 and company Y would be 4. Note that product 7 would be counted twice in this example. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download