fbdesignpro / sweetviz

Visualize and compare datasets, target values and associations, with one line of code.
MIT License
2.9k stars 273 forks source link

Bug: Compare with target_feat broken diagramms and wrong values #175

Open ChristopherDicke opened 1 month ago

ChristopherDicke commented 1 month ago

Hello,

given a dataframe with 3 values A, B and C. A and B are pivoted/flatten categorial features which only can be YES or Null. C is a numeric value.

I now split into 2 dataframe for A=YES and B=YES and use the compare method with target=C I get the following broken diagrams and data tables

image

image

I attached both dataframes A.csv B.csv

Here is the code:

report = sweetviz.compare([df_A, "A"], [df_B, "B"], target_feat='C') 
report.show_html("test.html")

I am running Python 3.10.11 Here is the pip freeze:

asttokens==2.4.1
colorama==0.4.6
comm==0.2.2
contourpy==1.2.1
cycler==0.12.1
debugpy==1.8.2
decorator==5.1.1
exceptiongroup==1.2.2
executing==2.0.1
fonttools==4.53.1
importlib_resources==6.4.0
ipykernel==6.29.5
ipython==8.26.0
jedi==0.19.1
Jinja2==3.1.4
jupyter_client==8.6.2
jupyter_core==5.7.2
kiwisolver==1.4.5
MarkupSafe==2.1.5
matplotlib==3.9.1
matplotlib-inline==0.1.7
nest-asyncio==1.6.0
numpy==1.26.2
packaging==24.1
pandas==2.1.3
parso==0.8.4
pillow==10.4.0
platformdirs==4.2.2
prompt_toolkit==3.0.47
psutil==6.0.0
pure-eval==0.2.2
Pygments==2.18.0
pyodbc==4.0.34
pyparsing==3.1.2
python-dateutil==2.9.0.post0
pytz==2024.1
pywin32==306
pyzmq==26.0.3
scipy==1.13.1
six==1.16.0
stack-data==0.6.3
sweetviz==2.3.1
tornado==6.4.1
tqdm==4.66.4
traitlets==5.14.3
typing_extensions==4.12.2
tzdata==2024.1
wcwidth==0.2.13

Please fix!