The Wayback Machine - https://web.archive.org/web/20190322175136/https://github.com/pandas-profiling/pandas-profiling
Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Create HTML profiling reports from pandas DataFrame objects
Branch: master
Clone or download
romainx Merge pull request #144 from dsvolk/master
Fixed wrong NaT hist bins in plot.py
Latest commit b427d4e Dec 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
pandas_profiling
.gitignore Don't track ipynb checkpoints Aug 3, 2016
.travis.yml Remove python 2.6 and add python >= 2.7 requirement because of the us… Apr 19, 2016
LICENSE Initial commit Jan 9, 2016
MANIFEST.in Add LICENSE to MANIFEST.in Aug 25, 2016
README.md Merge pull request #146 from jameslamb/readme_example Nov 30, 2018
appveyor.yml Add install script for appveyor Apr 19, 2016
appveyor_install.ps1 Add install script for appveyor Apr 19, 2016
profile_csv.py Move standalone script Jan 10, 2016
setup.cfg
setup.py Release 1.4.1 Jan 10, 2018
tox.ini update pandas version Feb 2, 2017

README.md

MAINTAINERS WANTED - Notice of neglect

This package does not have a current active maintainer. If you are interested to take on the role of main developer, feel free to reach out to @JosPolfliet.

pandas-profiling

Generates profile reports from a pandas DataFrame. The pandas df.describe() function is great but a little basic for serious exploratory data analysis.

For each column the following statistics - if relevant for the column type - are presented in an interactive HTML report:

  • Essentials: type, unique values, missing values
  • Quantile statistics like minimum value, Q1, median, Q3, maximum, range, interquartile range
  • Descriptive statistics like mean, mode, standard deviation, sum, median absolute deviation, coefficient of variation, kurtosis, skewness
  • Most frequent values
  • Histogram
  • Correlations highlighting of highly correlated variables, Spearman and Pearson matrixes

Demo

Click here to see a live demo.

Installation

Using pip

You can install using the pip package manager by running

pip install pandas-profiling

Using conda

You can install using the conda package manager by running

conda install pandas-profiling

From source

Download the source code by cloning the repo or by pressing 'Download ZIP' on this page. Install by navigating to the proper directory and running

python setup.py install

Usage

The profile report is written in HTML5 and CSS3, which means pandas-profiling requires a modern browser.

Jupyter Notebook (formerly IPython)

We recommend generating reports interactively by using the Jupyter notebook.

Start by loading in your pandas DataFrame, e.g. by using

import numpy as np
import pandas as pd
import pandas_profiling

df=pd.DataFrame(
    np.random.rand(100, 5),
    columns=['a', 'b', 'c', 'd', 'e']
)

To display the report in a Jupyter notebook, run:

pandas_profiling.ProfileReport(df)

To retrieve the list of variables which are rejected due to high correlation:

profile = pandas_profiling.ProfileReport(df)
rejected_variables = profile.get_rejected_variables(threshold=0.9)

If you want to generate a HTML report file, save the ProfileReport to an object and use the to_file() function:

profile = pandas_profiling.ProfileReport(df)
profile.to_file(outputfile="output.html")

Python

For standard formatted CSV files that can be read immediately by pandas, you can use the profile_csv.py script. Run

python profile_csv.py -h

for information about options and arguments.

Advanced usage

A set of options are available in order to adapt the report generated.

  • bins (int): Number of bins in histogram (10 by default).
  • Correlation settings:
    • check_correlation (boolean): Whether or not to check correlation (True by default)
    • correlation_threshold (float): Threshold to determine if the variable pair is correlated (0.9 by default).
    • correlation_overrides (list): Variable names not to be rejected because they are correlated (None by default).
    • check_recoded (boolean): Whether or not to check recoded correlation (False by default). Since it's an expensive computation it can be activated for small datasets.
  • pool_size (int): Number of workers in thread pool. The default is equal to the number of CPU.

Dependencies

  • An internet connection. Pandas-profiling requires an internet connection to download the Bootstrap and JQuery libraries. I might change this in the future, let me know if you want that sooner than later.
  • python (>= 2.7)
  • pandas (>=0.19)
  • matplotlib (>=1.4)
  • six (>=1.9)
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.