Changing settings

There are three ways to change the settings listed in Available settings:

  • through code

  • through a custom configuration file

  • through environment variables

Through code

Configuration example
 # Create the ProfileReport object without specifying a DataFrame
 profile = df.profile_report(title="Pandas Profiling Report", pool_size=1)

 # Change the configuration as desired
 profile.config.html.minify_html = False

 # Specify a DataFrame and trigger the report's computation

Some related settings are grouped together in configuration shorthands, making it easy to selectively enable or disable certain report sections or functionality:

  • samples: control whether the dataset preview is shown.

  • correlation: control whether correlation computations are executed.

  • missing_diagrams: control whether missing value analysis is executed.

  • duplicates: control whether duplicate rows are previewed.

  • interactions: control whether interactions are computed.

# Disable samples, correlations, missing diagrams and duplicates at once
r = ProfileReport(

Through a custom configuration file

To control pandas-profiling through a custom file, you can start with one of the sample configuration files below:

Change the configuration to your liking and point towards that configuration file when computing the report:

from pandas_profiling import ProfileReport

profile = ProfileReport(df, config_file="your_config.yml")

Through environment variables

Any configuration setting can also be read from environment variables. For example:

from pandas_profiling import ProfileReport

profile = ProfileReport(df, title="My Custom Pandas Profiling Report")

is equivalent to setting the title as an environment variable

export PROFILE_TITLE="My Custom Pandas Profiling Report"

and then running

from pandas_profiling import ProfileReport

profile = ProfileReport(df)