Answered step by step
Verified Expert Solution
Link Copied!

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;

P1. Using any process you like, create the following table as a pandas DataFrame named Vendors. The top row is column names; the left-most column is row names:
Office Stuff Superstore Medingstone, Inc. Treadstone, Inc.
address 43 Wallaby Way 1337 Broadmore Ave. 415 East 71st St.
City Sydney New York City New York City
State ND NY NY
zipcode 584011010810021
Phone 701-456-1557212-683-1448212-413-3322
supply_type Office Supplies Therapy Tools Other Assets
P2. Transpose the Vendors DataFrame and re-save it with the same name.
P3. Create a new column named vendor_name with the same values as the row names (after transposition).
P4. Create a column of zeroes named NY.
P5. In a single statement, replace the values in NY with 1 if the state variable is equal to NY.
P6. Use a summary method from Table 5-8 on pg.162 of PDA to calculate how many vendors are from NY.
P7. Use a summary method from Table 5-8 on pg.162 of PDA to calculate the proportion of vendors that are from NY.
P8. Drop the NY column from your DataFrame.

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago