File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ def __init__(
85
85
if df is None and not lazy :
86
86
raise ValueError ("Can init a not-lazy ProfileReport with no DataFrame" )
87
87
88
+ if df is not None and df .empty :
89
+ raise ValueError (
90
+ "DataFrame is empty. Please provide a non-empty DataFrame."
91
+ )
92
+
88
93
if config_file is not None and minimal :
89
94
raise ValueError (
90
95
"Arguments `config_file` and `minimal` are mutually exclusive."
Original file line number Diff line number Diff line change 13
13
],
14
14
)
15
15
def test_empty (test_data ):
16
- profile = ProfileReport (test_data , progress_bar = False )
17
- description = profile .get_description ()
18
-
19
- assert len (description ["correlations" ]) == 0
20
- assert len (description ["missing" ]) == 0
21
-
22
- html = profile .to_html ()
23
- assert "Dataset is empty" in html
16
+ with pytest .raises (ValueError ):
17
+ ProfileReport (test_data , progress_bar = False )
You can’t perform that action at this time.
0 commit comments