Streamlit 30 day challenge issue with pandas_profiling


I am doing the streamlit 30 days challenge course.
When importing pandas_profiling I get an error that is not solved by updating pandas and pandas_profiling.

Steps to reproduce

Code snippet:

import pandas as pd

import numpy as np
import streamlit as st
import altair as alt
from datetime import time, datetime
from vega_datasets import data as vega_data
import pandas_profiling

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

simple import

Explain what you expect to happen when you run the code above.

ImportError: cannot import name ‘to_html’ from ‘’ (C:\Users\Hans\anaconda3\envs\streamlit-env\lib\site-packages\pandas_profiling\

Explain the undesired behavior or error you see when you run the code above.
If you’re seeing an error message, share the full contents of the error message here.

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.


  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.

1 Like

I am using latest streamlit version, python 3.10 and using conda

I did conda install -c conda-forge pandas-profiling
for updates I did conda update pandas


So I think I solved the issue for myself. Apparently, I read on Pypi that the package pandas-profiling is changed to the name and update: “data-profiling”…After installing this package and then importing ydata_profiling in the script instead of pandas-profiling all works fine, and no more errors.

The Streamlit devs might want to update this for their 30-day course challenge on day 14:streamlit components ==> pandas-profiling is now ydata-profiling


Hi @hans

Thanks for pointing this out. Day 14 has been updated to ydata_profiling from pandas_profiling.

For a full working example please see the following repo:

The demo app is here:

Best regards,

1 Like

Check this app, i have developed using ydata_profiling

Demo App:

Git Hub repo : GitHub - Jagadeesha89/y_data_profiling

1 Like

My pleasure!