Describe An Array
Goal¶
This post aims to describe an array using pandas. As an example, Boston Housing Data is used in this post.
Reference
Libraries¶
In [13]:
import pandas as pd
from sklearn.datasets import load_boston
%matplotlib inline
Create an array¶
In [4]:
boston = load_boston()
df_boston = pd.DataFrame(boston['data'], columns=boston['feature_names'])
df_boston.head()
Out[4]:
Describe numerical values¶
pandas
DataFrame has a method, called describe
, which shows basic statistics based on the data types for each columns
In [5]:
df_boston.describe()
Out[5]: