Importing the Data
Before we begin with the actual analysis, we will need to import the required packages as follows:
# Import basic libraries import numpy as np import pandas as pd # import visualization libraries import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline
Next, read/import the dataset into the work environment:
df = pd.read_excel('default_credit.xls') df.head(5)
The output will be as follows:
![Figure 6.2: Top five rows of the DataFrame](https://static.packt-cdn.com/products/9781839211386/graphics/image/B15760_06_02.jpg)
Figure 6.2: Top five rows of the DataFrame
Check the metadata of the DataFrame:
# Getting Meta Data Information about the dataset df.info()
The output will be similar to the image shown below:
![Figure 6.3: Information of the DataFrame](https://static.packt-cdn.com/products/9781839211386/graphics/image/B15760_06_03.jpg)
Figure 6.3: Information of the DataFrame
Check the descriptive statistics for the numerical columns in the DataFrame:
df.describe().T
The output will be as follows:
![Figure 6.4: Descriptive statistics of the DataFrame](https://static.packt-cdn.com/products/9781839211386/graphics/image/B15760_06_04.jpg)
Figure 6.4: Descriptive statistics of the DataFrame
Next, check for null values:
...