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 in binning comparison target in graph_numeric.py #172

Open SadieRobertson opened 5 months ago

SadieRobertson commented 5 months ago

When using sweetviz.compare() on two identical datasets, we found that the target line plot in numerical graphs would not match up for the final bin. On taking a look at the code we noticed that a step is missed when binning the compare dataset target. In graph_numerical.py we noticed that on line 118 that the step to add data points which fall outside the bin range to the final bin is repeated for the source dataset instead of being carried out for the compare dataset. Swapping this to the compare data set solves the issue.

Image