Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python for data science find the HW2_DataA here: https://drive.google.com/drive/folders/1T_1c6PfJO4gp02w619H3xgMAUHGSnvTX Problem A [40 Marks]: Consider data given in HW2_DataA Microsoft Excel Comma Separated Values (.CSV) file.

python for data science

find the HW2_DataA here:

https://drive.google.com/drive/folders/1T_1c6PfJO4gp02w619H3xgMAUHGSnvTX

image text in transcribed

Problem A [40 Marks]: Consider data given in "HW2_DataA" Microsoft Excel Comma Separated Values (.CSV) file. Using the given data, do the following tasks: A-1. [3 marks]: Read the data (Assume the 1st row in HW2_DataA contains the column headings). Then display: (i) 10 randomly selected rows (ii) 10 last rows for all columns. A-2. [5 marks]: Create a new dataframe (let's say: ndf) by selecting the first 20 rows from column-2 (Type_of_Payment) to column-6 (Late_delivery) and then sort the second column of the new dataframe in descending order and the third column of the new dataframe in ascending order. A-3. [2 marks]: Considering the new dataframe from part A-2, display the separate statistical summary for numerical and non-numerical columns. A-4. [5 marks]: From the original dataset "HW2_DataA", How many customers below the age of 40 ordered a smart watch using the first class shipping mode? A-5. [5 marks]: Add a new column (Order_Item_Discount_New) by converting "Order_Item_Discount" column values from float to nearest integer using the apply command and custom function. [Note: using lambda function is not allowed]

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions