Task-4: Plot a scatter plot with the Model Year values in the x-axis and their value counts in the y-axis. Make sure the plot has proper labels and title. [Hint: You can use Series.index attribute to have model year as a data sequence]. Comment on your observations in a following markdown cell. 59]: #GIVE YOUR ANSWER FOR TASK-4 IN THIS CELL model_year_data-pd.DataFrame(model_year) plt.scatter(ev_pop[ "Model Year'], model_year_data[ 'Model Year'])

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

I'm stuck on converting the series into a data frame, so it can be used in a scatter plot. Task 4

A Week 7 Assignment.ipynb
+ X O
Code
Python 3
Task-3: Extract the value counts for each 'Model Year' and save the pandas Series in the variable name 'model_year
[51]: #GIVE YOUR ANSWER FOR TASK-3 IN THIS CELL
model_year=ev_pop['Model Year'].value_counts()
model_year
[51]: 2018
13256
2019
10345
2020
9154
2017
8106
2016
6274
2015
5030
2013
4891
2014
3772
2012
1737
2021
946
2011
880
2010
31
2008
23
2000
1999
3
2002
2
1993
1
1997
1
1998
1
Name: Model Year, dtype: int64
At this point model_year is a pandas Series having the 'Model Year' values as its index and count of values as the Series.
If we explore the dataset we shall see the 'Base MSRP' column inexplacably contain a good number of values equal to 'zero' and in some case unusually high values (can be disregarded as outlier) which are
greater than 100,000.
Task-4: Plot a scatter plot with the Model Year values in the x-axis and their value counts in the y-axis. Make sure the plot has proper labels and title. [Hint: You can use Series.index attribute to have model year
as a data sequence]. Comment on your observations in a following markdown cell.
[59]: #GIVE YOUR ANSWER FOR TASK-4 IN THIS CELL
model_year_data=pd. DataFrame(model_year)
plt.scatter(ev_pop[ 'Model Year'],model_year_data['Model Year'])
Transcribed Image Text:A Week 7 Assignment.ipynb + X O Code Python 3 Task-3: Extract the value counts for each 'Model Year' and save the pandas Series in the variable name 'model_year [51]: #GIVE YOUR ANSWER FOR TASK-3 IN THIS CELL model_year=ev_pop['Model Year'].value_counts() model_year [51]: 2018 13256 2019 10345 2020 9154 2017 8106 2016 6274 2015 5030 2013 4891 2014 3772 2012 1737 2021 946 2011 880 2010 31 2008 23 2000 1999 3 2002 2 1993 1 1997 1 1998 1 Name: Model Year, dtype: int64 At this point model_year is a pandas Series having the 'Model Year' values as its index and count of values as the Series. If we explore the dataset we shall see the 'Base MSRP' column inexplacably contain a good number of values equal to 'zero' and in some case unusually high values (can be disregarded as outlier) which are greater than 100,000. Task-4: Plot a scatter plot with the Model Year values in the x-axis and their value counts in the y-axis. Make sure the plot has proper labels and title. [Hint: You can use Series.index attribute to have model year as a data sequence]. Comment on your observations in a following markdown cell. [59]: #GIVE YOUR ANSWER FOR TASK-4 IN THIS CELL model_year_data=pd. DataFrame(model_year) plt.scatter(ev_pop[ 'Model Year'],model_year_data['Model Year'])
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY