标签:time() hmm mon groupby tps and das amp pandas
df[‘pdate‘]=pd.to_datetime(df[‘Timestamp‘],unit=‘s‘)
df_group=df.groupby([df["pdate"].dt.month,"Rating"])["UserID"].agg(np.sum)
更具体参考:https://blog.csdn.net/qq_39290225/article/details/98313743
16.Pandas将时间戳格式改为YYYY-mm-DD hh:MM:ss (to_datetime()方法)和从日期中快速取成月份
标签:time() hmm mon groupby tps and das amp pandas
原文地址:https://www.cnblogs.com/hisweety/p/13368660.html