import numpy as np
import pandas as pd
import [Link] as plt
name = "Data Visualization"
credits = 3
is_lab = True
print(name, credits, is_lab, type(credits))
Data Visualization 3 True <class 'int'>
fruits = ["Apple", "Banana", "Mango"]
prices = {"Apple": 100, "Banana": 40, "Mango": 120}
print(fruits[1], prices["Mango"])
Banana 120
def square_list(numbers):
return [x**2 for x in numbers]
print(square_list([1,2,3,4,5]))
[1, 4, 9, 16, 25]
arr = [Link]([10, 20, 30, 40])
print("Mean:", [Link](arr))
print("Standard Deviation:", [Link](arr))
Mean: 25.0
Standard Deviation: 11.180339887498949
df =
pd.read_csv("[Link]
)
print([Link]())
print([Link]())
Index Height(Inches)" "Weight(Pounds)"
0 1 65.78 112.99
1 2 71.52 136.49
2 3 69.40 153.03
3 4 68.22 142.34
4 5 67.79 144.30
Index Height(Inches)" "Weight(Pounds)"
count 200.000000 200.000000 200.000000
mean 100.500000 67.949800 127.221950
std 57.879185 1.940363 11.960959
min 1.000000 63.430000 97.900000
25% 50.750000 66.522500 119.895000
50% 100.500000 67.935000 127.875000
75% 150.250000 69.202500 136.097500
max 200.000000 73.900000 158.960000
print(df[df[' Height(Inches)"'] > 70])
print([Link](' Height(Inches)"').mean())
Index Height(Inches)" "Weight(Pounds)"
1 2 71.52 136.49
7 8 70.01 136.46
15 16 71.09 140.00
18 19 71.23 137.90
26 27 70.84 142.42
33 34 70.60 136.22
34 35 71.80 140.10
52 53 70.27 125.48
55 56 70.18 147.89
56 57 70.41 155.90
64 65 70.81 135.32
71 72 70.84 134.02
82 83 70.05 155.38
87 88 70.09 131.59
88 89 70.18 121.12
91 92 70.24 141.49
92 93 71.49 140.61
94 95 70.06 133.46
95 96 70.56 131.80
111 112 70.05 127.61
112 113 70.19 131.64
114 115 70.01 122.04
129 130 70.24 133.98
131 132 71.23 130.70
134 135 71.10 128.14
138 139 73.90 151.39
154 155 72.44 136.74
156 157 70.98 158.96
158 159 72.02 138.78
174 175 73.83 139.30
190 191 70.19 144.99
199 200 71.39 127.88
Index "Weight(Pounds)"
Height(Inches)"
63.43 98.0 123.10
63.48 23.0 97.90
63.84 110.0 127.19
64.05 40.0 106.71
64.13 156.0 106.11
... ... ...
71.80 35.0 140.10
72.02 159.0 138.78
72.44 155.0 136.74
73.83 175.0 139.30
73.90 139.0 151.39
[167 rows x 2 columns]
x = [1,2,3,4,5]
y = [2,4,6,8,10]
[Link](x, y, marker='o')
[Link]("Simple Line Plot")
[Link]("X-axis")
[Link]("Y-axis")
[Link]()
[Link](df[' Height(Inches)"'], bins=10, color='skyblue')
[Link]("Height Distribution")
[Link]()