Skip to content

Commit

Permalink
fix: raise ValueError if ProfileReport has empty dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohaib90 committed Jan 20, 2023
1 parent ea29771 commit 3bd9565
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pandas_profiling/profile_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def __init__(
if df is None and not lazy:
raise ValueError("Can init a not-lazy ProfileReport with no DataFrame")

if df is not None and df.empty:
raise ValueError("DataFrame is empty. Please provide a non-empty DataFrame.")

if config_file is not None and minimal:
raise ValueError(
"Arguments `config_file` and `minimal` are mutually exclusive."
Expand Down

0 comments on commit 3bd9565

Please sign in to comment.