Everybody has heard of the sentence a _picture is worth a thousand words. _The reason why this sentence is so well known is that it’s true. There are things that only our eyes can catch. That’s why data visualization is an essential step for any project or report. A person who is not familiarized with the dataset can easily give us insights into it. However, creating data visualizations can be time-consuming, and sometimes, you want to take a quick look at the dataset. Luckily, we have QuickDA, a library that can solve this issue.

I have written about how you can use QuickDA to perform exploratory data analysis efficiently, and the results were terrific. Please check the blog Save Hours of Work Doing a Complete EDA With a Few Lines of Code With This Library to get more information about using it for EDA. You will not be disappointed. Let’s now see how to use QuickDA to create the first visualizations.

Installation

To install QuickDA, go to your terminal and paste pip install quickda. It’s that easy. You are now ready to use it. You can find the notebook I used for QuickDA On my GitHub.

Let’s now import everything we need.

## Importing libraries
from quickda.explore_data import *
from quickda.clean_data import *
from quickda.explore_numeric import *
from quickda.explore_categoric import *
from quickda.explore_numeric_categoric import *
from quickda.explore_time_series import *

Creating Visualizations for Numerical Features

As I mentioned in the title, you can create visualizations with one line of code, and I will prove it to you. There are a few ways to do it, and we will check each of them. The first one is creating multiple visualizations for numerical data. Here is the code:

eda_num(data)

Voilá. As you can see, with one line of code, I created multiple data visualizations. QuickDA creates boxplots and histograms for each feature. It could not be easier than that. The downside is that sometimes we don’t know what to develop visualizations for every feature. Often, only one or two data visualizations can do the job. Luckily, QuickDA is capable of creating visualizations for selected data with the following code:

eda_num(data[['column_1', 'columns_2', 'column_n']])

It’s crucial to use the double brackets since QuickDA cannot interpret Pandas Series.

Correlation Matrix

Need a correlation matrix? No problem. You can type the following code and check how correlated your features are.

eda_num(data, method="correlation")

I don’t love the style of QuickDA’s correlation matrix, but it does the job. We can easily see which features are highly correlated in red. Easy breezy!

#data-visualization #data-analysis #coding #data-science #python

How to Create Data Visualizations in Python With One Line of Code
1.35 GEEK