Data analysis and visualization in Python
Image by Luke Chesser on Unsplash

Many a time, I have seen beginners in data science skip exploratory data analysis (EDA) and jump straight into building a hypothesis function or model. In my opinion, this should not be the case. We should first perform an EDA as it will connect us with the dataset at an emotional level and yes, of course, will help in building good hypothesis function.

EDA is a very crucial step. It gives us a glimpse of what our data set is all about, its uniqueness, its anomalies and finally it summarizes the main characteristics of the dataset for us. In this post, I will share a very basic guide for performing EDA.

Step 1: Import your data set and have a good look at the data.

In order to perform EDA, we will require the following python packages.

Packages to import:

Once we have imported the packages successfully, we will move on to importing our dataset. You must be aware of read_csv() tool from pandas for reading csv files.

Import the dataset:

For the purpose of this tutorial, I have used Loan Prediction dataset from Analytics Vidhya. If you wish to code along, here is the link.

The dataset has been successfully imported. Let’s have a look at the Train dataset.

Train.head()

Fig 1 : Overview of Train dataset

head() gives us a glimpse of the dataset. It can be considered similar to select * from database_table limit 5 in SQL. Let’s go ahead and explore a little bit more about the different fields in the Train dataset. info() gives uses all the relevant information on the dataset. If your dataset has more numerical variables, consider using describe() too to summarize data along mean, median, standard variance, variance etc.

Train.info()

Fig 2 : Columns in the dataset

We observe that there are 614 records and 13 columns in the dataset. Train dataset has Loan_ID, Gender, Married, Dependents, Education, Self_Employed, Property_Area and Loan_status as object types. Object type in pandas is similar to strings. ApplicantIncome field is of integer type. The other three fields namely CoapplicantIncome, Loan_Amount_Term and Credit_History are floating point types.
['Priyanka Meena']
['Python', 'Data Science', 'Data Analysis', 'Data Visualization', 'Pandas']