📌  相关文章
📜  布尔索引日期时间对象 |将字符串转换为日期时间对象 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:07.170000             🧑  作者: Mango

代码示例1
#convert col fromt string to dt 
df['date_time'] = pd.to_datetime(df['date_time'])

#boolean indexing on column 
day = i_94.copy()[(df['date_time'].dt.hour >= time_val) & (df['date_time'].dt.hour < time_val)]
print(day.shape)