Question: P 1 . Using any process you like, create the following table as a pandas DataFrame named Vendors . The top row is column names;
P Using any process you like, create the following table as a pandas DataFrame named Vendors The top row is column names; the leftmost column is row names:
Office Stuff Superstore Medingstone, Inc. Treadstone, Inc.
address Wallaby Way Broadmore Ave. East st St
City Sydney New York City New York City
State ND NY NY
zipcode
Phone
supplytype Office Supplies Therapy Tools Other Assets
P Transpose the Vendors DataFrame and resave it with the same name.
P Create a new column named vendorname with the same values as the row names after transposition
P Create a column of zeroes named NY
P In a single statement, replace the values in NY with if the state variable is equal to NY
P Use a summary method from Table on pg of PDA to calculate how many vendors are from NY
P Use a summary method from Table on pg of PDA to calculate the proportion of vendors that are from NY
P Drop the NY column from your DataFrame.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
