From f782a1886d513ddc2d3ff25df8b19cefa9e35380 Mon Sep 17 00:00:00 2001 From: AutoViML Date: Thu, 25 Apr 2024 06:32:26 -0400 Subject: [PATCH] New version 0.1.901 fixes issues --- autoviz/AutoViz_Holo.py | 19 +++++++++++++------ autoviz/__version__.py | 2 +- setup.py | 6 +++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/autoviz/AutoViz_Holo.py b/autoviz/AutoViz_Holo.py index a3ac770..bd4a307 100644 --- a/autoviz/AutoViz_Holo.py +++ b/autoviz/AutoViz_Holo.py @@ -225,7 +225,12 @@ def AutoViz_Holo(filename, sep=',', depVar='', dfte=None, header=0, verbose=0, drawobj5 = draw_violinplot_hv(dfin, dep, nums, chart_format, problem_type, mk_dir, verbose) ls_objects.append(drawobj5) if len(nums) > 0: - drawobj6 = draw_heatmap_hv(dfin, nums, chart_format, date_vars, dep, problem_type, classes, + #### Adding int vars to nums since pandas has changed the df.corr() to error when cats are included ### + if len(cats) > 0: + nums_in = nums + dfin[cats].select_dtypes(include="number").columns.tolist() + else: + nums_in = nums[:] + drawobj6 = draw_heatmap_hv(dfin, nums_in, chart_format, date_vars, dep, problem_type, classes, mk_dir, verbose) ls_objects.append(drawobj6) if len(date_vars) > 0: @@ -1035,7 +1040,7 @@ def create_figure(x, y): opts['alpha'] = alpha opts['tools'] = ['hover'] opts['toolbar'] = 'above' - opts['colorbar'] = True + #opts['colorbar'] = True #opts['color'] = next(colors) opts['title'] = title='Time Series plots of Numeric vars' dft = df.set_index(df[x]) @@ -1115,15 +1120,16 @@ def draw_heatmap_hv(dft, conti, chart_format, datevars=[], dep=None, dft_target = dft[conti] dft_target[dep] = dft[dep].values corre = dft_target.corr() + corre = corre.round(2) if timeseries_flag: heatmap = corre.hvplot.heatmap(height=height_size, width=width_size, colorbar=True, cmap=cmap_list, rot=70, - title='Time Series: Heatmap of all Differenced Continuous vars for target = %s' %dep) + title='Time Series: Heatmap of all Differenced Numeric vars for target = %s' %dep) else: heatmap = corre.hvplot.heatmap(height=height_size, width=width_size, colorbar=True, cmap=cmap_list, rot=70, - title='Heatmap of all Continuous Variables including target'); + title='Heatmap of all Numeric Variables including target'); hv_plot = heatmap * hv.Labels(heatmap).opts(opts.Labels(text_font_size='7pt')) hv_panel = pn.panel(hv_plot) if verbose == 2: @@ -1143,17 +1149,18 @@ def draw_heatmap_hv(dft, conti, chart_format, datevars=[], dep=None, dft_target = dft_target[:] N = len(conti) corre = dft_target.corr() + corre = corre.round(2) if timeseries_flag: heatmap = corre.hvplot.heatmap(height=height_size, width=width_size, colorbar=True, cmap=cmap_list, rot=70, - title='Time Series Data: Heatmap of Differenced Continuous vars including target').opts( + title='Time Series Data: Heatmap of Differenced Numeric vars including target').opts( opts.HeatMap(tools=['hover'], toolbar='above')) else: heatmap = corre.hvplot.heatmap(height=height_size, width=width_size, colorbar=True, cmap=cmap_list, rot=70, - title='Heatmap of all Continuous Variables including target').opts( + title='Heatmap of all Numeric Variables including target').opts( opts.HeatMap(tools=['hover'], toolbar='above')) hv_plot = heatmap * hv.Labels(heatmap).opts(opts.Labels(text_font_size='7pt')) hv_panel = pn.panel(hv_plot) diff --git a/autoviz/__version__.py b/autoviz/__version__.py index 7d37a50..a08b4a8 100644 --- a/autoviz/__version__.py +++ b/autoviz/__version__.py @@ -5,7 +5,7 @@ __author__ = "Ram Seshadri" __description__ = "Automatically Visualize any data set any size with a Single Line of Code" __url__ = "https://github.com/AutoViML/AutoViz.git" -__version__ = "0.1.808" +__version__ = "0.1.901" __holo_version__ = "0.0.4" __license__ = "Apache License 2.0" __copyright__ = "2020-21 Google" diff --git a/setup.py b/setup.py index 64023fb..f8c5f36 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ "holoviews<=1.14.9", # Older compatible version "panel~=0.14.4", ## this is an old versjon of panel "param==1.13.0", ### something broke in panel without this - "pandas<2.0", ## pandas must be below 2.0 version + "pandas>=2.0", ## pandas must be below 2.0 version ] # For Python versions >= 3.10 and < 3.11, update the dependency list @@ -47,7 +47,7 @@ "holoviews>=1.15.3", # Update based on the bug fix relevant to Python 3.10 # Ensure other dependencies are compatible "panel>=1.4.0", ## this is a new version of panel - "pandas<2.0", ## pandas must be below 2.0 version + "pandas>=2.0", ## pandas must be below 2.0 version ] # For Python versions >= 3.11, ensure HoloViews is at least 1.15.3 for the bug fix @@ -64,7 +64,7 @@ setuptools.setup( name="autoviz", - version="0.1.808", + version="0.1.901", author="Ram Seshadri", description="Automatically Visualize any dataset, any size with a single line of code", long_description=long_description,