将CSV文件,导入IPython Notebook中。
try:
import graphlab as gl
import graphlab.aggregate as agg
import matplotlib.pyplot as plt
from matplotlib import rcParams
import datetime as dt
%matplotlib inline
except:
raise ImportError("Key libraries cannot be loaded.")
#########################
gl.canvas.set_target('ipynb')
#########################
rcParams['figure.figsize']=(10,10)
rcParams['axes.titlesize']=22
rcParams['axes.labelsize']=20
rcParams['xtick.labelsize']=16
rcParams['ytick.labelsize']=16
rcParams['xtick.direction']='out'
rcParams['ytick.direction']='out'
def clean_plot(ax):
for x in ax.spines.values():
x.set_visible(False)
ax.grid(True,'major',color='w',linestyle='-',linewidth=1.4)
ax.patch.set_facecolor('0.92')
ax.set_asisbelow(True)
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
#########################
sf = gl.SFrame.read_csv('XX.csv')
##########################
sf
##########################
sf.show()
http://www.36dsj.com/archives/69888
http://www.tuicool.com/articles/a6JRr2Y