ydataai / ydata-profiling

1 Line of code data quality profiling & exploratory data analysis for Pandas and Spark DataFrames.

Home Page:https://docs.profiling.ydata.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug Report: DispatchError: Function <code object pandas_missing_bar

kalverra opened this issue · comments

Current Behaviour

  • Attempt to profile a basic df
  • Receive the following error
DispatchError: Function <code object pandas_missing_bar at 0x16a4d4190, file "<filepath>/.venv/lib/python3.9/site-packages/ydata_profiling/model/pandas/missing_pandas.py", line 13>

Expected Behaviour

Profile should complete successfully.

Data Description

Date Product SKU Quantity
2023-06-07 Actions Compute - UBUNTU 469.0000
2023-06-07 Actions Compute - UBUNTU 60.0000
2023-06-07 Actions Compute - UBUNTU 47.0000
2023-06-07 Actions Compute - UBUNTU 56.0000
2023-06-07 Actions Compute - UBUNTU 47.0000

Code that reproduces the bug

import pandas as pd
import plotly.express as px
from ydata_profiling import ProfileReport
pd.options.plotting.backend = "plotly"

df = pd.read_csv("data.csv")
profile = ProfileReport(df, correlations={"auto": {"calculate": False}})
profile.to_file("profile.html")

pandas-profiling version

4.7.0

Dependencies

Python 3.9.6
pandas==2.2.1
plotly==5.20.0

OS

MacOS Sonoma 14.4

Checklist

  • There is not yet another bug report for this issue in the issue tracker
  • The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
  • The issue has not been resolved by the entries listed under Common Issues.

Trace and visual

image

Hi @kalverra ,

this is a known issue. Please check the solution in this thread: #1071

In a nutshell your pandas plotting default is set to plotly (which is not supported) instead of matplotlib.

Let me know if solves your issue.