Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Q2 and Q3 (autosaved)

Python 3
Not Trusted

 File
 Edit
 View
 Insert
 Cell
 Kernel
 Help

CodeMarkdownRaw NBConvertHeading-

In [5]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
In [6]:
df = pd.read_csv("ObesityDataSet_raw_and_data_sinthetic.csv")
df
Out[6]:
S
G family_his F F C
He We N M S F T NObe
en Ag tory_with A C CA H CA MTR
ig igh C O C A U yesda
de e _overweig V V EC 2 LC ANS
ht t P K C F E d
r ht C C O
E

Fe 21. 1. So 2. 0.0 1. Public


64. 3 Norma
m 00 62 n 2. me 00 n 00 00 _Trans
0 000 yes . no no l_Wei
al 00 00 o 0 tim 00 o 00 00 portati
000 0 ght
e 00 00 es 00 0 00 on

Fe 21. 1. So 3. 3.0 0. So Public


56. 3 y Norma
m 00 52 n 3. me ye 00 00 00 me _Trans
1 000 yes . e l_Wei
al 00 00 o 0 tim s 00 00 00 tim portati
000 0 s ght
e 00 00 es 00 0 00 es on

23. 1. So 2. 2.0 1. Fre Public


M 77. 3 Norma
00 80 n 2. me 00 n 00 00 que _Trans
2 al 000 yes . no l_Wei
00 00 o 0 tim 00 o 00 00 ntl portati
e 000 0 ght
00 00 es 00 0 00 y on

3 M 27. 1. 87. no n 3. 3 So no 2. n 2.0 0. Fre Walkin Overw


S
G family_his F F C
He We N M S F T NObe
en Ag tory_with A C CA H CA MTR
ig igh C O C A U yesda
de e _overweig V V EC 2 LC ANS
ht t P K C F E d
r ht C C O
E

00 80 me 00 00 00 que eight_
al 000 .
00 00 o 0 tim 00 o 00 00 ntl g Level_
e 000 0
00 00 es 00 0 00 y I

22. 1. So 2. 0.0 0. So Public Overw


M 89. 1
00 78 n 2. me 00 n 00 00 me _Trans eight_
4 al 800 no . no
00 00 o 0 tim 00 o 00 00 tim portati Level_
e 000 0
00 00 es 00 0 00 es on II

29. 1. So 2. 0.0 0. So
M 53. 3 Norma
00 62 y 2. me 00 n 00 00 me Autom
5 al 000 no . no l_Wei
00 00 es 0 tim 00 o 00 00 tim obile
e 000 0 ght
00 00 es 00 0 00 es

Fe 23. 1. So 2. 1.0 0. So
55. 3 Norma
m 00 50 y 3. me 00 n 00 00 me Motor
6 000 yes . no l_Wei
al 00 00 es 0 tim 00 o 00 00 tim bike
000 0 ght
e 00 00 es 00 0 00 es

22. 1. So 2. 3.0 0. So Public


M 53. 3 Norma
00 64 n 2. me 00 n 00 00 me _Trans
7 al 000 no . no l_Wei
00 00 o 0 tim 00 o 00 00 tim portati
e 000 0 ght
00 00 es 00 0 00 es on

24. 1. So 2. 1.0 1. Fre Public


M 64. 3 Norma
00 78 y 3. me 00 n 00 00 que _Trans
8 al 000 yes . no l_Wei
00 00 es 0 tim 00 o 00 00 ntl portati
e 000 0 ght
00 00 es 00 0 00 y on

22. 1. So 2. 1.0 1. Public


M 68. 3 Norma
00 72 y 2. me 00 n 00 00 _Trans
9 al 000 yes . no no l_Wei
00 00 es 0 tim 00 o 00 00 portati
e 000 0 ght
00 00 es 00 0 00 on

26. 1. 105 Fre 3. 2.0 2. So Public


M 3 Obesit
1 00 85 .00 y 3. que 00 n 00 00 me _Trans
al yes . no y_Typ
0 00 00 000 es 0 ntl 00 o 00 00 tim portati
e 0 e_I
00 00 0 y 00 0 00 es on

Fe 21. 1. Fre 2. 2.0 1. So Public Overw


80. 3 y
1 m 00 72 y 2. que 00 00 00 me _Trans eight_
000 yes . no e
1 al 00 00 es 0 ntl 00 00 00 tim portati Level_
000 0 s
e 00 00 y 00 0 00 es on II

22. 1. So 3. 2.0 0. So Public


M 56. 3 Norma
1 00 65 n 3. me 00 n 00 00 me _Trans
al 000 no . no l_Wei
2 00 00 o 0 tim 00 o 00 00 tim portati
e 000 0 ght
00 00 es 00 0 00 es on

41. 1. So 2. 2.0 1. Fre


M 99. 3 Obesit
1 00 80 y 2. me 00 n 00 00 que Autom
al 000 no . no y_Typ
3 00 00 es 0 tim 00 o 00 00 ntl obile
e 000 0 e_I
00 00 es 00 0 00 y

23. 1. So 1. 1.0 1. So Public


M 60. 1 Norma
1 00 77 y 3. me 00 n 00 00 me _Trans
al 000 yes . no l_Wei
4 00 00 es 0 tim 00 o 00 00 tim portati
e 000 0 ght
00 00 es 00 0 00 es on
S
G family_his F F C
He We N M S F T NObe
en Ag tory_with A C CA H CA MTR
ig igh C O C A U yesda
de e _overweig V V EC 2 LC ANS
ht t P K C F E d
r ht C C O
E

Fe 22. 1. 2. 2.0 1. So Public


66. 3 Al y Norma
1 m 00 70 n 3. 00 00 00 me _Trans
000 yes . wa no e l_Wei
5 al 00 00 o 0 00 00 00 tim portati
000 0 ys s ght
e 00 00 00 0 00 es on

27. 1. 102 So 1. 1.0 0. So Public Overw


M 1
1 00 93 .00 y 2. me 00 n 00 00 me _Trans eight_
al yes . no
6 00 00 000 es 0 tim 00 o 00 00 tim portati Level_
e 0
00 00 0 es 00 0 00 es on II

Fe 29. 1. So 2. 0.0 0.
78. 1 Obesit
1 m 00 53 y 2. me 00 n 00 00 Autom
000 no . no no y_Typ
7 al 00 00 es 0 tim 00 o 00 00 obile
000 0 e_I
e 00 00 es 00 0 00

Fe 30. 1. Fre 1. 0.0 0. Overw


82. 4
1 m 00 71 y 3. que ye 00 n 00 00 Autom eight_
000 yes . no
8 al 00 00 es 0 ntl s 00 o 00 00 obile Level_
000 0
e 00 00 y 00 0 00 II

Fe 23. 1. So 2. 0.0 0. So Public Overw


70. 1
1 m 00 65 n 2. me 00 n 00 00 me _Trans eight_
000 yes . no
9 al 00 00 o 0 tim 00 o 00 00 tim portati Level_
000 0
e 00 00 es 00 0 00 es on I

22. 1. So 2. 3.0 2. Overw


M 80. 3
2 00 65 n 2. me 00 n 00 00 Walkin eight_
al 000 yes . no no
0 00 00 o 0 tim 00 o 00 00 g Level_
e 000 0
00 00 es 00 0 00 II

Fe 52. 1. So 2. 0.0 0.
87. 1 Obesit
2 m 00 69 y 3. me ye 00 n 00 00 Autom
000 yes . no y_Typ
1 al 00 00 es 0 tim s 00 o 00 00 obile
000 0 e_I
e 00 00 es 00 0 00

Fe 22. 1. So 2. 1.0 0. So
60. 3 Norma
2 m 00 65 y 3. me 00 n 00 00 me Autom
000 yes . no l_Wei
2 al 00 00 es 0 tim 00 o 00 00 tim obile
000 0 ght
e 00 00 es 00 0 00 es

Fe 22. 1. So 2. 0.0 2. So Public


82. 1 Obesit
2 m 00 60 y 1. me 00 n 00 00 me _Trans
000 yes . no y_Typ
3 al 00 00 es 0 tim 00 o 00 00 tim portati
000 0 e_I
e 00 00 es 00 0 00 es on

21. 1. So 2. 0.0 1. So Public


M 68. 3 Norma
2 00 85 y 2. me 00 n 00 00 me _Trans
al 000 yes . no l_Wei
4 00 00 es 0 tim 00 o 00 00 tim portati
e 000 0 ght
00 00 es 00 0 00 es on

20. 1. Fre 2. 3.0 2. Public


M 50. 4 Norma
2 00 60 n 2. que ye 00 n 00 00 _Trans
al 000 yes . no l_Wei
5 00 00 o 0 ntl s 00 o 00 00 portati
e 000 0 ght
00 00 y 00 0 00 on

2 M 21. 1. 65. yes y 2. 1 Fre no 2. n 1.0 2. Al Walkin Norma


6 al 00 70 000 es 0 . que 00 o 00 00 wa g l_Wei
e 00 00 000 0 ntl 00 00 00 ys ght
S
G family_his F F C
He We N M S F T NObe
en Ag tory_with A C CA H CA MTR
ig igh C O C A U yesda
de e _overweig V V EC 2 LC ANS
ht t P K C F E d
r ht C C O
E

00 00 y 00 0 00

Fe 23. 1. Fre 2. 2.0 1. So


52. 4 Norma
2 m 00 60 y 2. que 00 n 00 00 me Autom
000 no . no l_Wei
7 al 00 00 es 0 ntl 00 o 00 00 tim obile
000 0 ght
e 00 00 y 00 0 00 es

19. 1. So 2. 3.0 1. So Public


M 76. 3 y Norma
2 00 75 y 3. me 00 00 00 me _Trans
al 000 yes . no e l_Wei
8 00 00 es 0 tim 00 00 00 tim portati
e 000 0 s ght
00 00 es 00 0 00 es on

23. 1. So 2. 2.0 2. Fre


M 70. 3 Norma
2 00 68 y 2. me 00 n 00 00 que Walkin
al 000 no . no l_Wei
9 00 00 es 0 tim 00 o 00 00 ntl g
e 000 0 ght
00 00 es 00 0 00 y

.. .. ..
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
. . .

2 Fe 21. 1. 133 So 2. 1.4 0. So Public


3 Obesit
0 m 57 75 .84 y 3. me 74 n 27 90 me _Trans
yes . no y_Typ
8 al 21 10 506 es 0 tim 85 o 03 28 tim portati
0 e_III
1 e 14 67 4 es 69 7 25 es on

2 Fe 21. 1. 133 So 2. 1.4 0. So Public


3 Obesit
0 m 68 74 .95 y 3. me 82 n 12 90 me _Trans
yes . no y_Typ
8 al 01 91 509 es 0 tim 77 o 35 10 tim portati
0 e_III
2 e 23 18 1 es 73 7 71 es on

2 Fe 24. 1. 113 So 2. 0.3 0. So Public


3 Obesit
0 m 46 66 .07 y 3. me 63 n 00 26 me _Trans
yes . no y_Typ
8 al 97 33 718 es 0 tim 22 o 96 95 tim portati
0 e_III
3 e 56 41 7 es 24 4 60 es on

2 Fe 25. 1. 112 So 2. 0.1 0. So Public


3 Obesit
0 m 12 66 .55 y 3. me 86 n 15 02 me _Trans
yes . no y_Typ
8 al 79 85 545 es 0 tim 86 o 36 85 tim portati
0 e_III
4 e 10 37 6 es 79 9 83 es on

2 Fe 25. 1. 112 So 2. 0.0 0. So Public


3 Obesit
0 m 98 66 .24 y 3. me 93 n 43 13 me _Trans
yes . no y_Typ
8 al 63 89 969 es 0 tim 01 o 10 86 tim portati
0 e_III
5 e 68 51 9 es 37 1 29 es on

2 Fe 25. 1. 112 So 2. 0.2 0. So Public


3 Obesit
0 m 95 66 .09 y 3. me 96 n 59 08 me _Trans
yes . no y_Typ
8 al 19 17 861 es 0 tim 18 o 42 01 tim portati
0 e_III
6 e 79 12 6 es 99 4 28 es on

2 Fe 26. 1. 111 So 2. 0.0 0. So Public


3 Obesit
0 m 00 63 .82 y 3. me 55 n 00 22 me _Trans
yes . no y_Typ
8 al 00 34 181 es 0 tim 06 o 00 46 tim portati
0 e_III
7 e 00 42 7 es 72 0 55 es on

2 Fe 26. 1. 111 yes y 3. 3 So no 2. n 0.0 0. So Public Obesit


0 m 00 63 .86 es 0 . me 58 o 00 23 me _Trans y_Typ
8 al 00 30 318 0 tim 43 00 21 tim portati e_III
S
G family_his F F C
He We N M S F T NObe
en Ag tory_with A C CA H CA MTR
ig igh C O C A U yesda
de e _overweig V V EC 2 LC ANS
ht t P K C F E d
r ht C C O
E

8 e 00 20 6 es 05 0 08 es on

2 Fe 26. 1. 111 So 2. 0.0 0. So Public


3 Obesit
0 m 00 63 .87 y 3. me 62 n 00 12 me _Trans
yes . no y_Typ
8 al 00 38 813 es 0 tim 19 o 00 38 tim portati
0 e_III
9 e 00 87 2 es 76 0 61 es on

2 Fe 26. 1. 111 So 2. 0.0 0. So Public


3 Obesit
0 m 00 64 .93 y 3. me 72 n 00 09 me _Trans
yes . no y_Typ
9 al 00 34 998 es 0 tim 22 o 00 17 tim portati
0 e_III
0 e 00 21 3 es 76 0 11 es on

2 Fe 26. 1. 111 So 2. 0.0 0. So Public


3 Obesit
0 m 00 64 .55 y 3. me 63 n 00 17 me _Trans
yes . no y_Typ
9 al 00 05 596 es 0 tim 43 o 00 83 tim portati
0 e_III
1 e 00 35 7 es 42 0 01 es on

2 Fe 26. 1. 111 So 2. 0.0 0. So Public


3 Obesit
0 m 00 62 .35 y 3. me 61 n 00 17 me _Trans
yes . no y_Typ
9 al 00 64 706 es 0 tim 93 o 00 10 tim portati
0 e_III
2 e 00 83 2 es 90 0 34 es on

2 Fe 26. 1. 111 So 2. 0.0 0. So Public


3 Obesit
0 m 00 64 .92 y 3. me 78 n 00 09 me _Trans
yes . no y_Typ
9 al 00 59 249 es 0 tim 67 o 00 77 tim portati
0 e_III
3 e 00 90 1 es 80 0 60 es on

2 Fe 26. 1. 111 So 2. 0.0 0. So Public


3 Obesit
0 m 00 64 .88 y 3. me 76 n 00 09 me _Trans
yes . no y_Typ
9 al 00 38 453 es 0 tim 81 o 00 42 tim portati
0 e_III
4 e 00 92 5 es 41 0 13 es on

2 Fe 25. 1. 104 So 1. 0.0 0. So Public


3 Obesit
0 m 97 61 .95 y 3. me 71 n 01 54 me _Trans
yes . no y_Typ
9 al 73 78 077 es 0 tim 65 o 27 59 tim portati
0 e_III
5 e 10 17 6 es 90 2 93 es on

2 Fe 25. 1. 104 So 2. 0.0 0. So Public


3 Obesit
0 m 95 62 .87 y 3. me 09 n 70 59 me _Trans
yes . no y_Typ
9 al 50 64 960 es 0 tim 49 o 89 94 tim portati
0 e_III
6 e 14 49 2 es 01 0 41 es on

2 Fe 25. 1. 105 So 2. 0.0 0. So Public


3 Obesit
0 m 99 62 .03 y 3. me 34 n 08 50 me _Trans
yes . no y_Typ
9 al 67 65 720 es 0 tim 73 o 01 38 tim portati
0 e_III
7 e 16 80 3 es 22 3 96 es on

2 Fe 25. 1. 104 So 2. 0.0 0. So Public


3 Obesit
0 m 99 60 .95 y 3. me 33 n 63 56 me _Trans
yes . no y_Typ
9 al 23 64 429 es 0 tim 11 o 38 16 tim portati
0 e_III
8 e 48 74 1 es 23 3 61 es on

2 Fe 25. 1. 108 So 1. 0.0 0. So Public


3 Obesit
0 m 97 62 .09 y 3. me 75 n 85 46 me _Trans
yes . no y_Typ
9 al 44 88 000 es 0 tim 71 o 11 54 tim portati
0 e_III
9 e 46 55 6 es 05 9 44 es on

2 Fe 25. 1. 107 yes y 3. 3 So no 2. n 0.0 0. So Public Obesit


S
G family_his F F C
He We N M S F T NObe
en Ag tory_with A C CA H CA MTR
ig igh C O C A U yesda
de e _overweig V V EC 2 LC ANS
ht t P K C F E d
r ht C C O
E

1 m 77 62 .37 me 50 25 48 me _Trans
. y_Typ
0 al 75 82 870 es 0 tim 66 o 78 41 tim portati
0 e_III
0 e 65 05 2 es 31 7 65 es on

2 Fe 25. 1. 107 So 2. 0.0 0. So Public


3 Obesit
1 m 72 62 .21 y 3. me 48 n 67 45 me _Trans
yes . no y_Typ
0 al 20 84 894 es 0 tim 70 o 32 58 tim portati
0 e_III
1 e 04 70 9 es 70 9 23 es on

2 Fe 25. 1. 108 So 2. 0.0 0. So Public


3 Obesit
1 m 76 62 .10 y 3. me 32 n 45 41 me _Trans
yes . no y_Typ
0 al 56 78 736 es 0 tim 00 o 24 31 tim portati
0 e_III
2 e 28 39 0 es 68 6 06 es on

2 Fe 21. 1. 133 So 1. 1.5 0. So Public


3 Obesit
1 m 01 72 .03 y 3. me 65 n 37 91 me _Trans
yes . no y_Typ
0 al 68 42 352 es 0 tim 06 o 63 24 tim portati
0 e_III
3 e 49 68 3 es 12 9 57 es on

2 Fe 21. 1. 133 So 1. 1.5 0. So Public


3 Obesit
1 m 68 73 .04 y 3. me 61 n 10 93 me _Trans
yes . no y_Typ
0 al 23 23 394 es 0 tim 07 o 39 14 tim portati
0 e_III
4 e 67 83 1 es 68 8 55 es on

2 Fe 21. 1. 131 So 1. 1.7 0. So Public


3 Obesit
1 m 28 72 .33 y 3. me 79 n 28 89 me _Trans
yes . no y_Typ
0 al 59 69 578 es 0 tim 62 o 33 79 tim portati
0 e_III
5 e 65 20 6 es 67 2 24 es on

2 Fe 20. 1. 131 So 1. 1.6 0. So Public


3 Obesit
1 m 97 71 .40 y 3. me 72 n 76 90 me _Trans
yes . no y_Typ
0 al 68 07 852 es 0 tim 81 o 26 62 tim portati
0 e_III
6 e 42 30 8 es 39 9 47 es on

2 Fe 21. 1. 133 So 2. 1.3 0. So Public


3 Obesit
1 m 98 74 .74 y 3. me 00 n 41 59 me _Trans
yes . no y_Typ
0 al 29 85 294 es 0 tim 51 o 39 92 tim portati
0 e_III
7 e 42 84 3 es 30 0 70 es on

2 Fe 22. 1. 133 So 2. 1.4 0. So Public


3 Obesit
1 m 52 75 .68 y 3. me 05 n 14 64 me _Trans
yes . no y_Typ
0 al 40 22 935 es 0 tim 41 o 20 62 tim portati
0 e_III
8 e 36 06 2 es 93 9 88 es on

2 Fe 24. 1. 133 So 2. 1.1 0. So Public


3 Obesit
1 m 36 73 .34 y 3. me 85 n 39 58 me _Trans
yes . no y_Typ
0 al 19 94 664 es 0 tim 23 o 10 60 tim portati
0 e_III
9 e 36 50 1 es 39 7 35 es on

2 Fe 23. 1. 133 So 2. 1.0 0. So Public


3 Obesit
1 m 66 73 .47 y 3. me 86 n 26 71 me _Trans
yes . no y_Typ
1 al 47 88 264 es 0 tim 35 o 45 41 tim portati
0 e_III
0 e 09 36 1 es 13 2 37 es on

2111 rows × 17 columns


In [7]:
df.shape
Out[7]:
(2111, 17)
In [8]:
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2111 entries, 0 to 2110
Data columns (total 17 columns):
Gender 2111 non-null object
Age 2111 non-null float64
Height 2111 non-null float64
Weight 2111 non-null float64
family_history_with_overweight 2111 non-null object
FAVC 2111 non-null object
FCVC 2111 non-null float64
NCP 2111 non-null float64
CAEC 2111 non-null object
SMOKE 2111 non-null object
CH2O 2111 non-null float64
SCC 2111 non-null object
FAF 2111 non-null float64
TUE 2111 non-null float64
CALC 2111 non-null object
MTRANS 2111 non-null object
NObeyesdad 2111 non-null object
dtypes: float64(8), object(9)
memory usage: 280.4+ KB
In [9]:
df.isnull().sum()
Out[9]:
Gender 0
Age 0
Height 0
Weight 0
family_history_with_overweight 0
FAVC 0
FCVC 0
NCP 0
CAEC 0
SMOKE 0
CH2O 0
SCC 0
FAF 0
TUE 0
CALC 0
MTRANS 0
NObeyesdad 0
dtype: int64
In [10]:
df.duplicated().sum()
Out[10]:
24
In [11]:
df.drop_duplicates(inplace = True)
print
Out[11]:
<function print>
In [12]:
df.shape
Out[12]:
(2087, 17)
In [13]:
df.describe()
Out[13]:
Age Height Weight FCVC NCP CH2O FAF TUE

coun 2087.0000 2087.0000 2087.0000 2087.0000 2087.0000 2087.0000 2087.0000 2087.0000


t 00 00 00 00 00 00 00 00

mea
24.353090 1.702674 86.858730 2.421466 2.701179 2.004749 1.012812 0.663035
n

std 6.368801 0.093186 26.190847 0.534737 0.764614 0.608284 0.853475 0.608153

min 14.000000 1.450000 39.000000 1.000000 1.000000 1.000000 0.000000 0.000000

25% 19.915937 1.630178 66.000000 2.000000 2.697467 1.590922 0.124505 0.000000

50% 22.847618 1.701584 83.101100 2.396265 3.000000 2.000000 1.000000 0.630866

108.01590
75% 26.000000 1.769491 3.000000 3.000000 2.466193 1.678102 1.000000
7

173.00000
max 61.000000 1.980000 3.000000 4.000000 3.000000 3.000000 2.000000
0

In [14]:
sum = 0
count = 0
for age in df['Age']:
sum += age
count += 1
print(count)
avg = sum/count
print(avg)
2087
24.3530897973
In [54]:
ct1=pd.crosstab(df['Gender'],df['SMOKE'])
ct1
Out[54]:
SMOKE no yes

Gender

102
Female 15
0

102
Male 29
3

In [52]:
ct2 = pd.crosstab(df['MTRANS'],df['NObeyesdad'])
ct2
Out[52]:
Insufficient Normal_ Obesity_ Obesity_T Obesity_T Overweight Overweight_
NObeyesdad
_Weight Weight Type_I ype_II ype_III _Level_I Level_II

MTRANS

Automobile 46 44 110 95 1 66 94

Bike 0 4 0 1 0 2 0

Motorbike 0 6 3 0 0 1 1

Public_Trans
215 197 236 200 323 198 189
portation

Walking 6 31 2 1 0 9 6

In [25]:
# Assuming ct1 is your DataFrame
ct1.plot(kind='bar', stacked=True, rot=0, color=['red', 'blue'])
plt.xlabel('smoke')
plt.ylabel('count')
plt.title('cross-tabulation of smoke and Gender') # Fixed missing closing parenthesis
plt.legend(['NO', 'Yes'])
plt.show()
In [30]:
df_encoded = pd.get_dummies(df)
plt.figure(figsize=(34,34))
sns.heatmap(df_encoded.corr(),annot = True , linewidth=0.5,fmt='0.2f')
plt.show()
In [51]:
fig, ax = plt.subplots(1, 3, figsize=(20, 6))
sns.distplot(df['Age'], ax=ax[0], kde=False)
sns.distplot(df[df['Gender'] == 'Male']['Age'], ax=ax[1], kde=True, label='Male')
sns.distplot(df[df['Gender'] == 'Female']['Age'], ax=ax[1], kde=True, label='Female')
sns.boxplot(x=df['Gender'], y=df['Age'], ax=ax[2])
ax[1].legend()
plt.suptitle("Visualizing AGE column", size=20)
plt.show()

You might also like