Data profiling in Pandas using Python

Pandas is one of the most popular Python library mainly used for data manipulation and analysis. When we are working with large data, many times we need to perform Exploratory Data Analysis. We need to get the detailed description about different columns available and there relation, null check, data types, missing values, etc. So, Pandas profiling is the python module which does the EDA and gives detailed description just with a few lines of code.

Installation:

pip install pandas-profiling

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

#import the packages
import pandas as pd
import pandas_profiling
   
# read the file
df = pd.read_csv('Geeks.csv')
   
# run the profile report
profile = df.profile_report(title='Pandas Profiling Report')
   
# save the report as html file
profile.to_file(output_file="pandas_profiling1.html")
   
# save the report as json file
profile.to_file(output_file="pandas_profiling2.json")

chevron_right


Output:

python-data-profiling-1



HTML File:

python-data-profiling-html-file

JSON File:

python-data-profiling-json-file

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.