Skip to content

Commit

Permalink
Merge pull request #3649 from beingmechon/master
Browse files Browse the repository at this point in the history
[Bug Fix] Fixed issues caused by old deprecated `pandas-profiling` library to new updated `ydata-profiling`
  • Loading branch information
ngupta23 committed Jul 27, 2023
2 parents 6662100 + 16e841e commit 9080269
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions pycaret/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@ def get_data(
else:
if profile:
_check_soft_dependencies(
"pandas_profiling",
"ydata_profiling",
extra="analysis",
severity="error",
install_name="pandas-profiling",
install_name="ydata-profiling",
)
import pandas_profiling
import ydata_profiling

# create a copy for pandas profiler
data_for_profiling = data.copy()

pf = pandas_profiling.ProfileReport(data_for_profiling)
pf = ydata_profiling.ProfileReport(data_for_profiling)
display.display(pf)

else:
Expand Down
6 changes: 2 additions & 4 deletions pycaret/internal/pycaret_experiment/tabular_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,9 @@ def _profile(self, profile, profile_kwargs):
if self.verbose:
print("Loading profile... Please Wait!")
try:
import pandas_profiling
import ydata_profiling

self.report = pandas_profiling.ProfileReport(
self.data, **profile_kwargs
)
self.report = ydata_profiling.ProfileReport(self.data, **profile_kwargs)
except Exception as ex:
print("Profiler Failed. No output to show, continue with modeling.")
self.logger.error(
Expand Down
2 changes: 1 addition & 1 deletion pycaret/utils/_show_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"shap",
"interpret",
"umap",
"pandas_profiling",
"ydata_profiling",
"explainerdashboard",
"autoviz",
"fairlearn",
Expand Down
2 changes: 1 addition & 1 deletion requirements-optional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
shap>=0.38.0
interpret>=0.2.7
umap-learn>=0.5.2
pandas-profiling>=3.1.0
ydata-profiling>=4.3.1
explainerdashboard>=0.3.8 # For dashboard method
Flask==2.2.3 # https://github.com/oegedijk/explainerdashboard/issues/259
bokeh<3.0.0 # For autoviz
Expand Down

0 comments on commit 9080269

Please sign in to comment.