Describe the bug
When passing an empty DataFrame to dataprep.eda.create_report, a ZeroDivisionError is raised without a clear explanation for the reason.
Especially when one does not realize the DataFrame is empty, this is a surprising outcome with little in the stacktrace hinting at the underlying problem.
To Reproduce
from dataprep.eda import create_report
import pandas
df = pandas.DataFrame()
create_report(df)
Expected behavior
Either
an empty report, possibly with a warning message, or
a clear and specific exception being raised.
Desktop (please complete the following information):
OS: Linux
Platform: Python script
Python Version 3.8.10
Dataprep Version 0.4.2
Additional context
I'm happy to implement a fix, if you let me know which the resulting behavior should be.
Describe the bug When passing an empty
DataFrame
todataprep.eda.create_report
, aZeroDivisionError
is raised without a clear explanation for the reason.Especially when one does not realize the
DataFrame
is empty, this is a surprising outcome with little in the stacktrace hinting at the underlying problem.To Reproduce
Expected behavior Either
Desktop (please complete the following information):
Additional context I'm happy to implement a fix, if you let me know which the resulting behavior should be.