#使用GraphLab Createimport graphlab
#读取csv数据集
sf = graphlab.SFrame("people-example.csv")
#SFrame 基础
sf
#查看数据头部
sf.head()
#查看数据尾部
sf.tail()
#GraphLab Canvas
#会打开一个新页面
sf.show()
#加上如下设置之后会在当前页面显示图表
graphlab.canvas.set_target("ipynb")
sf['age'].show(view='Categorical')
sf['age'].show(view='Numeric')
people-example.csv文件内容
First Name,Last Name,Country,age
"Bob","Smith","United States",24
"Alice","Williams","Canada",23
"Malcolm","Jone","England",22
"Felix","Brown","USA",23
"Alex","Cooper","Poland",23
"Tod","Campbell","United States",22
"Derek","Ward","Switzerland",25