Closed tallgaijin closed 1 year ago
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.iteritems.html Deprecated since version 1.5.0: iteritems is deprecated and will be removed in a future version. Use .items instead.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.mad.html?highlight=mad#pandas.DataFrame.mad Deprecated since version 1.5.0: mad is deprecated.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.mad.html?highlight=mad Deprecated since version 1.5.0: mad is deprecated.
Resolved by editing py file at line specified for iteritems. Have not tested resolution for mad deprecation
ZIP contains 4 main files of sweetviz project, and their backup copies (factory files before they were changed):
Totally 8 files, replace default *.py files in sweetviz’s work folder by these and you don't see any errors as earlier.
May it helps. Sweetviz is v2.1.4 (latest on 06 Feb 2023)
My code: import sweetviz as sv my_report = sv.analyze(df) my_report.show_html() # Default arguments will generate to "SWEETVIZ_REPORT.html"
Warnings:
C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\dataframe_report.py:74: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. all_source_names = [cur_name for cur_name, cur_series in source_df.iteritems()] C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\dataframe_report.py:109: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. filtered_series_names_in_source = [cur_name for cur_name, cur_series in source_df.iteritems()
C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\series_analyzer_cat.py:28: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. for item in category_counts.iteritems(): C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\series_analyzer_text.py:19: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. for item in to_process.source_counts["value_counts_without_nan"].iteritems(): C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\series_analyzer_text.py:19: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. for item in to_process.source_counts["value_counts_without_nan"].iteritems(): C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\series_analyzer_cat.py:28: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. for item in category_counts.iteritems(): C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\series_analyzer_numeric.py:25: FutureWarning: The 'mad' method is deprecated and will be removed in a future version. To compute the same result, you may do
(df - df.mean()).abs().mean()
. stats["mad"] = series.mad() C:\Users\thomp\AppData\Local\Programs\Python\Python311\Lib\site-packages\sweetviz\series_analyzer_numeric.py:25: FutureWarning: The 'mad' method is deprecated and will be removed in a future version. To compute the same result, you may do(df - df.mean()).abs().mean()
. stats["mad"] = series.mad()