首页 > 其他 > 详细

Data Visualizations 2

时间:2016-10-14 06:55:21      阅读:216      评论:0      收藏:0      [点我收藏+]

1.Histogram :

A histogram is a graph that enables you to visualize the distribution of values of a column.

Example: 

  import matplotlib.pyplot as plt

  columns = [‘Median‘,‘Sample_size‘]
  recent_grads.hist(column=columns)# to visulize the column "Median" and "Sample_size" and present them into two different charts.

2. The box plot: another way to represent a set of data. 

  sample_size = recent_grads[[‘Sample_size‘, ‘Major_category‘]] #sample_size is a filtered DataFrame which only contain two columns "Sample_size" and "Major_category"

  sample_size.boxplot(by=‘Major_category‘)# In the filtered DataFrame. We are going to categorize the data by using column "Major_category"

  plt.xticks(rotation=90)

SeaBorn:

1. Compare to Matplotlib, SeaBorn can create more compelling chart which is in a better style.

 

Data Visualizations 2

原文:http://www.cnblogs.com/kingoscar/p/5958731.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!