我正在尝试根据日期分割数据帧,这是索引。我的数据如下:
print(df.head())
date_time value anomaly
2014-11-23 00:00:00 0.414183 0
2014-11-23 01:00:00 0.526574 0
2014-11-23 02:00:00 0.734324 1
到目前为止我的代码是:
df_split = df.where(df.index >= '2014-11-23 01:00:00')
我想要的结果是:
2014-11-23 01:00:00 0.526574 0
2014-11-23 02:00:00 0.734324 1
我的错误是:
ValueError: Array conditional must be same shape as self
您需要^{} :
如果^{} 中的值已排序,请使用^{} :
相关问题 更多 >
编程相关推荐