I have some terminal charging values for US and CHINA comes in a pandas DataFrame like the following,

       value country  
0      550.0     USA        
1      820.0   CHINA        
2      835.0   CHINA        
3      600.0   USA        
4      775.0   CHINA        
5      785.0   USA        
6      790.0   USA   

This is the sample data and I have in total 5K+ entries. The data is cleared for the outliers and needs to be visualized. What kind of visualization can I use to plot my data meaningfully?

  • $\begingroup$ What specific visualization task do you need? Outliers detection or something else? $\endgroup$
    – Icyblade
    Mar 8, 2017 at 19:00
  • $\begingroup$ My instruction is The list of values per country should be visualised in a meaningful way, identifying the amount of good/bad charges present in the system. I have cleared the outliers earlier and this data is good. I thought the comparable visualization per country would be great while I can manually calculate the percentage of the outliers per country and store using some method. $\endgroup$
    – Arefe
    Mar 8, 2017 at 19:04
  • $\begingroup$ asymmetric beanplot maybe? example + statsmodels implementation (use 'side' argument with 'left' and 'right') $\endgroup$
    – oW_
    Mar 8, 2017 at 20:07

3 Answers 3


Maybe you can try something like this?

df.hist(by='country', bins=50)

If you want to plot these histograms in the same figure, checkout this.




If you need to be able to identify good and bad charge times then the points themselves are important.

I would have my x-axis be my country names and then simply plot the charge times on the y-axis as scattered points.

This will give you scattered data in the y-direction digitized for each country.

I think you will be able to extract a lot of meaningful information from this plot for comparing different countries such as: max, min, approx. mean, etc..


It depends on what is your objective.

Since you have so many values, you may want to plot some summary data, so you can use either two Distplots in a FacetGrid to have the two countries side by side or even better a Boxplot.

If the order of the appearance of the values matters you can try plot them as two different lines with the values on the y-axis by using FactorPlot.

(All the mentioned plots above are part of the Seaborn library)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.