Professional Documents
Culture Documents
DATp2.ipynb - Colaboratory
DATp2.ipynb - Colaboratory
ipynb - Colaboratory
import pandas as pd
df=pd.read_csv('/content/state_results.csv')
df.head(5)
output Release Period State Measure ID Bottom-box Percentage Middle-box Percentage Top-box Percentage
0 07_2015 AK H_CLEAN_HSP 8 22 70
1 07_2015 AK H_COMP_1 9 17 74
2 07_2015 AK H_COMP_2 10 15 75
3 07_2015 AK H_COMP_3 11 21 68
4 07_2015 AK H_COMP_5 19 17 64
import pandas as pd
df=pd.read_csv('/content/state_results.csv')
print(f'The mean of Bottom-box Percentage :{df["Bottom-box Percentage"].mean()}')
print(f'The median of Bottom-box Percentage :{df["Bottom-box Percentage"].median()}')
print(f'The mode of Bottom-box Percentage :{df["Bottom-box Percentage"].mode()}')
print(f'The range of Bottom-box Percentage :{df["Bottom-box Percentage"].max()-df["Bottom-box Percentage"].min()}')
print(f'The variance of Bottom-box Percentage :{df["Bottom-box Percentage"].var()}')
print(f'The stanndard deviation of Bottom-box Percentage :{df["Bottom-box Percentage"].std()}')
import pandas as pd
df=pd.read_csv('/content/test.csv')
df.head(5)
df=pd.read_csv('/content/test.csv')
print(f'The mean of EstimatedSalary :{df["EstimatedSalary"].mean()}')
print(f'The median of EstimatedSalary :{df["EstimatedSalary"].median()}')
print(f'The mode of EstimatedSalary :{df["EstimatedSalary"].mode()}')
print(f'The range of EstimatedSalary :{df["EstimatedSalary"].max()-df["EstimatedSalary"].min()}')
print(f'The variance of EstimatedSalary :{df["EstimatedSalary"].var()}')
print(f'The stanndard deviation of EstimatedSalary :{df["EstimatedSalary"].std()}')
import pandas as pd
df=pd.read_csv('/content/train.csv')
df.head(5)
https://colab.research.google.com/drive/1UacWZ8mEnblZwbseDBvmT-oW9qHobFt9#scrollTo=sjYFqJfvreQO 1/2
2/7/24, 11:33 PM DATp2.ipynb - Colaboratory
df=pd.read_csv('/content/test.csv')
print(f'The mean of CreditScore :{df["CreditScore"].mean()}')
print(f'The median of CreditScore :{df["CreditScore"].median()}')
print(f'The stanndard deviation of CreditScore :{df["CreditScore"].std()}')
https://colab.research.google.com/drive/1UacWZ8mEnblZwbseDBvmT-oW9qHobFt9#scrollTo=sjYFqJfvreQO 2/2