非均匀时间序列按固定时间间隔求和
摘要:df.resample('1h',on='news_time').sum().emo
阅读全文
随机训练样本的方法
摘要:np.random.permutation(len(df)) 随机训练样本的方法
阅读全文
df.empty判断空df,timestamp推算n秒前的时间
摘要:1 if not p1.empty: 2 pass 3 else: 4 p1_weekend = datetime.fromtimestamp(unix-unix_weekend).strftime("%Y-%m-%d") 5 p1 = get_price(index[each],start_dat
阅读全文