def disp_gap_bydate(self):
gaps_mean = self.gapdf.groupby('time_date')['gap'].mean()
gaps_mean.plot(kind='bar')
plt.ylabel('Mean of gap')
plt.title('Date/Gap Correlation')
# for i in gaps_mean.index:
# plt.plot([i,i], [0, gaps_mean[i]], 'k-')
plt.show()
return
# def drawGapDistribution(self):
# self.gapdf[self.gapdf['gapdf'] < 10]['gapdf'].hist(bins=50)
# # sns.distplot(self.gapdf['gapdf']);
# # sns.distplot(self.gapdf['gapdf'], hist=True, kde=False, rug=False)
# # plt.hist(self.gapdf['gapdf'])
# plt.show()
# return
# def drawGapCorrelation(self):
# _, (ax1, ax2) = plt.subplots(nrows=2, ncols=1)
# res = self.gapdf.groupby('start_district_id')['gapdf'].sum()
# ax1.bar(res.index, res.values)
# res = self.gapdf.groupby('time_slotid')['gapdf'].sum()
# ax2.bar(res.index.map(lambda x: x[11:]), res.values)
# plt.show()
# return
评论列表
文章目录