Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started