Question
A company that manufactures riding mowers wants to identify the best sales prospects for an intensive sales campaign. In particular, the manufacturer is interested in
A company that manufactures riding mowers wants to identify the best sales prospects for an intensive sales campaign. In particular, the manufacturer is interested in classifying households as prospective owners or nonowners on the basis of Income (in $ 1000s) and Lot Size (in 1000 ft2). The marketing expert looked at a random sample of 24 households, given in the file RidingMowers.csv.
Income | Lot_Size | Ownership |
60 | 18.4 | Owner |
85.5 | 16.8 | Owner |
64.8 | 21.6 | Owner |
61.5 | 20.8 | Owner |
87 | 23.6 | Owner |
110.1 | 19.2 | Owner |
108 | 17.6 | Owner |
82.8 | 22.4 | Owner |
69 | 20 | Owner |
93 | 20.8 | Owner |
51 | 22 | Owner |
81 | 20 | Owner |
75 | 19.6 | Nonowner |
52.8 | 20.8 | Nonowner |
64.8 | 17.2 | Nonowner |
43.2 | 20.4 | Nonowner |
84 | 17.6 | Nonowner |
49.2 | 17.6 | Nonowner |
59.4 | 16 | Nonowner |
66 | 18.4 | Nonowner |
47.4 | 16.4 | Nonowner |
33 | 18.8 | Nonowner |
51 | 14 | Nonowner |
63 | 14.8 | Nonowner |
Using Python, create a scatter plot of Lot Size vs. Income, color-coded by the outcome variable owneronowner. Make sure to obtain a well-formatted plot (create legible labels and a legend, etc.).
# 1. load the data using Pandas read_csv (1 line of code) # MISSING: one line of code needed.
# 2. Print the number of rows and columns (1 line of code) # MISSING: one line of code needed.
output:
(24, 3)
Using pandas, write the code in Python to get the following output
# scatter plot of Lot Size vs. Income # Hint: Color the points by Ownership for this assignment.
Out[12]: : Income Lot_Size Ownership 0 60.0 18.4 Owner 1 85.5 16.8 Owner 2 64.8 21.6 Owner Owner 61.5 20.8 4 87.0 23.6 Owner Out[13]:
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