Skip to content
Advertisement

Plotting pairs of bins in a histogram for comparison with seaborn

I have a Dataframe which consists of some ML models with 2 columns for train & test accuracies respectively

JavaScript

And I want to plot in similar to to this:

enter image description here

Where the x value is the number of models where it’s ticks will be replaced by the model names, and the y value will be a pair of each accuracy metric.

I tried something like:

JavaScript

But it raises the following error:

JavaScript

I don’t seem to be able to unpack the y values as a pair of bins with that list.

Advertisement

Answer

Without using seaborn and using just pandas you can do this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement