Closed SvenGroen closed 1 year ago
Hey @SvenGroen, thanks for the elaborate description and already researching the problems. I decided that upgrading to use the latest version of dython and pandas seemed the most sensible, which is what I did.
The changes are in the PR, and I'll release a new version sometimes soon!
Hi, it seems that plot_correlation_difference() is incompatible with the newest pandas version (1.5.2).
You can find a Notebook for recreation here: https://colab.research.google.com/drive/1zE7lSGwIVVD3o8eJEAm3_IWjSSkK8wsM?usp=sharing
I think I also know where the problem is:
Inside your
plot_correlation_difference(...
) insideviz.py
you calculate the correlation matrix withdython.nominal.associations
(Line 72)for
dython==0.5.1
insideassociations(...)
_comp_assoc(...)
is directly called and actually calculated the correlation matrix correctly (at least in my local example). The problem for me starts when sns tries to calculate the heatmap. the pandas dataframe that contains the correlation matrix (variable corr) seems to be of type object and not float which seems to cause an error later.an easy "fix" would be to change your requirements.txt file for pandas==1.3.5. or maybe have update to the newest dython version (have not checked if this works)
a solution I have found is, that you can also replace :
fake_corr= associations(...)['corr']
withdython.nominal.compute_associations
:Here is a working example:
this Problem might also occur in other cases where you have used
associations(...)
but I only encountered it in this scenario.