如何根据条件删除行

时间:2019-02-13 10:52:36

标签: pandas python-2.7 datetime filter between

如何在06/02/2019 14:38之前和06/02/2019 14:41之后删除警报

Alarm Number    Alarm Type  Severity    Alarm Time  Probable Cause
111 Processing  Minor   06/02/2019 14:25    Application Subsystem Failure
222 Communication   Minor   06/02/2019 14:25    Communication Subsystem Failure
333 Communication   Minor   06/02/2019 14:38    Communication Subsystem Failure
444 Communication   Minor   06/02/2019 14:38    Communication Subsystem Failure
1223    Processing  Minor   06/02/2019 14:38    Application Subsystem Failure
4343    Processing  Minor   06/02/2019 14:39    Application Subsystem Failure
414134  Communication   Minor   06/02/2019 14:39    Communication Subsystem Failure
443314  Communication   Minor   06/02/2019 14:39    Communication Subsystem Failure
1343443 Communication   Minor   06/02/2019 14:39    Communication Subsystem Failure
41343434    Processing  Minor   06/02/2019 14:41    Application Subsystem Failure
343 Communication   Minor   06/02/2019 14:41    Communication Subsystem Failure
343 Communication   Minor   06/02/2019 14:41    Communication Subsystem Failure
34343   Communication   Minor   06/02/2019 14:41    Communication Subsystem Failure
34343   Processing  Minor   06/02/2019 16:44    Application Subsystem Failure
34344   Quality Of Service  Major   12/02/2019 09:48    Database inconsistency

1 个答案:

答案 0 :(得分:0)

如果格式为{{1}的to_datetimedayfirst=True一起使用,并且between的thyen过滤器为boolean indexing

DD/MM/YYYY HH:MM