263 rows x 2 columns In [15]: print("Visualization :") df = df.drop(['sum'], axis=1) df.plot(x = 'Country/Region', kind = 'bar') visualization : Out[15]: 400000 Lat Long 1/22/2020 350000 300000 1/23/2020 1/24/2020 250000 1/25/2020 1/26/2020 200000 1/27/2020 150000 1/28/2020 1/29/2020 100000 1/30/2020 1/31/2020 50000 2/1/2020 2/2/2020 2/3/2020 2/4/2020 2/5/2020 2/6/2020 2/7/2020 2/8/2020 2/9/2020 2/10/2020 2/11/2020 2/12/2020 2/13/2020 2/14/2020 Country/Region 2/15/2020 Antigua an Bosnia and ng Central African Saint Vincent and the Ga adsate ik BLUOI OPs

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

Python code

Hi, i got an assignment to visualize the data of people who have been confirmed to have COVID-19 but it seems that the visualization is a bit messy because there are many countries, the result is that the country names are unreadable and messy. so how can i fix this code?

262 Sao Tome and Principe
29.598882
263 rows x 2 columns
In [15]: print("Visualization :")
df = df.drop(['sum'], axis=1)
df.plot(x = 'Country/Region', kind = 'bar')
Visualization :
Out[15]: <AxesSubplot:xlabel='country/Region'>
400000
Lat
Long
1/22/2020
350000
300000
1/23/2020
1/24/2020
250000
1/25/2020
1/26/2020
200000
1/27/2020
150000
1/28/2020
1/29/2020
100000
1/30/2020
1/31/2020
50000
2/1/2020
2/2/2020
2/3/2020
2/4/2020
2/5/2020
2/6/2020
2/7/2020
2/8/2020
2/9/2020
2/10/2020
2/11/2020
2/12/2020
2/13/2020
2/14/2020
Country/Region
2/15/2020
2/16/2020
Bosnia and
Central African
Saint Vincent and the a
T adate DR BLUOI OBs
Transcribed Image Text:262 Sao Tome and Principe 29.598882 263 rows x 2 columns In [15]: print("Visualization :") df = df.drop(['sum'], axis=1) df.plot(x = 'Country/Region', kind = 'bar') Visualization : Out[15]: <AxesSubplot:xlabel='country/Region'> 400000 Lat Long 1/22/2020 350000 300000 1/23/2020 1/24/2020 250000 1/25/2020 1/26/2020 200000 1/27/2020 150000 1/28/2020 1/29/2020 100000 1/30/2020 1/31/2020 50000 2/1/2020 2/2/2020 2/3/2020 2/4/2020 2/5/2020 2/6/2020 2/7/2020 2/8/2020 2/9/2020 2/10/2020 2/11/2020 2/12/2020 2/13/2020 2/14/2020 Country/Region 2/15/2020 2/16/2020 Bosnia and Central African Saint Vincent and the a T adate DR BLUOI OBs
In [14]: df['sum'] = df.sum(axis=1)
data =
df[['Country/Region', 'sum']]
data
Out[14]:
Country/Region
sum
Afghanistan
7104.000000
1
Albania
9174.643200
2
Algeria 26647.387000
Andorra 12250.056200
4
Angola
271.342400
...
258
United Kingdom
-208.639800
259
France
-12.861400
260
South Sudan
84.368000
261
Western Sahara
46.659400
262 Sao Tome and Principe
29.598882
263 rows x 2 columns
In [15]: print("Visualization :")
df = df.drop(['sum'], axis=1)
df.plot(x = 'Country/Region', kind = 'bar')
visualization :
Out[15]: <AxesSubplot:xlabel='Country/Region'>
400000
Lat
Long
וכמך
350000
Transcribed Image Text:In [14]: df['sum'] = df.sum(axis=1) data = df[['Country/Region', 'sum']] data Out[14]: Country/Region sum Afghanistan 7104.000000 1 Albania 9174.643200 2 Algeria 26647.387000 Andorra 12250.056200 4 Angola 271.342400 ... 258 United Kingdom -208.639800 259 France -12.861400 260 South Sudan 84.368000 261 Western Sahara 46.659400 262 Sao Tome and Principe 29.598882 263 rows x 2 columns In [15]: print("Visualization :") df = df.drop(['sum'], axis=1) df.plot(x = 'Country/Region', kind = 'bar') visualization : Out[15]: <AxesSubplot:xlabel='Country/Region'> 400000 Lat Long וכמך 350000
Expert Solution
steps

Step by step

Solved in 4 steps with 1 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