【发布时间】:2021-09-13 07:20:19
【问题描述】:
我有一个 pandas 数据框,该数据框有一列 created_date 是纪元格式。我想使用如下所示的过滤条件。
数据框示例
created_time updated_time sys_time last_action_time account_id \
0 1624473000000 1624459148023 1624459148023 0 812
1 1624471920000 1624448094358 1624448094358 0 812
2 1624469400000 1624455267579 1624455267579 0 812
3 1624466580000 1624466620020 1624466590321 0 812
4 1624466529000 1624466610222 1624466540086 0 812
5 1624466501000 1624466610270 1624466510212 0 812
6 1624466461000 1624466620149 1624466469825 0 812
7 1624466443000 1624466446558 1624466446558 0 812
8 1624466435000 1624466460213 1624466460213 0 812
daily_data_df = [(data_df['created_time'] >= start_date_int) & (data_df['created_time'] < end_date_int)
在哪里,
start_date_int & end_date_int 是 GMT+7 时区
created_time 是纪元格式
请帮助我进行转换。
【问题讨论】:
-
您需要过滤方面的帮助吗?如果是,请同时提供 start_date_int & end_date_int 的示例数据
标签: python pandas dataframe data-conversion