Question: Run the following code to create a dataframe object dr and assign a dataset which contains the sales achievement of the salemen in different

Run the following code to create a dataframe object dr and assign a dataset which contains the sales achievement of the salemen in different stores. Then write code to complete the tasks below. Store Code Stuff a S1000) Mary Als Mi .. Jimmy 14 Leo 20 Anport pandas as pd inport numpy as df pd.Datafrane (data-ap.array((('B', 'Hary', 101, ('A', 'Peter',201, ('A', 'Ada'1.', 'ike1.1'A', 'Jimmy,16). C, Leo',7}}}\ columns= ('Store Code', 'Staff Hama', 'Bales Achievement (in $1000) 1) Store Code Staff Hans Bales Achievement (in 61000) Mary Peter Ada Mike A A A 0 Jimmy Loo 10 20 6 8 16 E4.1 Retrieve the column of "Staff Name' E4.2 Retrieve the columns of "Staff Name" and "Sales Achievement (in $1000)" 54.3 (5 points) Use loc and label-based index to Retrieve the sales achievement of Peter, Mike and Jimmy. E4.4 Use lloc and Interger-based index to retrieve the same information as required in E4.3. E4.5 Get all the records associated with Department A. Hint: Use boolean mask and loc operator. + Code + Text
Step by Step Solution
3.49 Rating (169 Votes )
There are 3 Steps involved in it
It seems like there are some errors in the provided code for creating the DataFrame Let me correct t... View full answer
Get step-by-step solutions from verified subject matter experts
