Professional Documents
Culture Documents
Python Code
Python Code
import pandas as pd
# Load data
housing.iloc[:,0:1]
housing.Total_Value
# Descriptive statistics
Table 4.3
Cereals_df = pd.read_csv(‘Cereals.csv’)
Cereals_df.head(9)
Cereals_df .describe()
# cereals
Pd.DataFrame({‘mean’ : cereals_df.mean() ,
‘sd’ : cereals_df.std() ,
‘min’ : cereals_df.min() ,
‘max’ : cereals_df.max() ,
‘median’ : cereals_df.median})
df = pd.read_csv("Cereals.csv")
df.head()
# import pandas
import pandas as pd
# import matplotlib
# import seaborn
%matplotlib inline