Skip to content
Advertisement

Compare two dataframe columns on a histogram

I have a dataframe that looks similar to:

JavaScript

I am required to give a visual comparison of true and estimated distances.

My actual df shape is:

JavaScript

How do I show true_distance side-by-side estimated_distance on a plot, where one can easily see the difference in each row, considering the side of my df_actual?

Advertisement

Answer

Here are some ways to do it.

Method1

JavaScript

output

enter image description here

Method 2

JavaScript

output

enter image description here

Method3

JavaScript

enter image description here

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