Python Pandas - Hands On 1
Python Pandas - Hands On 1
import numpy as np
s1 = 176.2
s2 = 158.4
s3 = 167.6
s4 = 156.2
s5 = 161.4
heights_A_list = [s1,s2,s3,s4,s5]
heights_A = pd.Series(heights_A_list)
print(heights_A.shape)
s1 = 85.1
s2 = 90.2
s3 = 76.8
s4 = 80.4
s5 = 78.9
weights_A_list = [s1,s2,s3,s4,s5]
weights_A = pd.Series(weights_A_list)
print(weights_A.dtype)
np.random.seed(100)
heights_B_numpy = np.random.normal(loc=170.0, scale=25.0, size=5)
weights_B_numpy = np.random.normal(loc=75.0, scale=12.0, size=5)
#print("heights_B",heights_B)
#print("weights_B",weights_B)
heights_B = pd.Series(heights_B_numpy)
weights_B = pd.Series(weights_B_numpy)
print(heights_B.mean())