def timeGroup (frame, step, file_csv):
dfx = frame.set_index(['time'])
dfx = dfx[dfx.status == 'accepted']
grouper = dfx.groupby([pd.TimeGrouper(step), 'Miner'])
dfTimeS = grouper['Miner'].count().unstack('Miner').fillna(0)
dfTimeS = dfTimeS[:-1] #There are arguments for and against this. The final group is not 'complete', so we will not include it.
dfTimeS.to_csv(file_csv, encoding='utf-8')
return dfTimeS
#Summary tables
评论列表
文章目录