📜  大熊猫日期时间查询 - Python 代码示例

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

代码示例1
from time import datetime

date_start = datetime(year_start, month_start, day_start)
date_end = datetime(year_end, month_end, day_end)

# df is your pandas dataframe
sel = df[(df['timestamp'] >= date_start) &\
         (df['timestamp'] <= date_end)]

# tested with
# python 3.9.4
# pandas 1.3.2