注意: 单次循环中,计算任务所花的时间 >> 单次IO读取的时间时, for line in file/cursor 更好 单次循环中,计算任务所花的时间 << 单次IO读取的时间时, for line in file.readlines()/cursor.fetchall() 更好
画分布图
http://seaborn.pydata.org/examples/distplot_options.html?highlight=distribution
In [16]:
%matplotlib inline
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
rs = np.random.RandomState(10)
# Plot a historgram and kernel density estimate
sns.distplot(rs.normal(size=100), color="m")
Out[16]:
In [ ]: