我有一个包含以下列的 CSV(示例)文件
PC_name,Time,Plant,Section,PC_value
35901052,2017-08-01 05:50,MIYAKONOJO,MIYAKONOJO_05,0.000
35901052,2017-08-01 05:51,MIYAKONOJO,MIYAKONOJO_05,0.000
35901052,2017-08-01 05:56,MIYAKONOJO,MIYAKONOJO_05,0.000
35901052,2017-08-01 06:01,MIYAKONOJO,MIYAKONOJO_05,0.000
35901052,2017-08-01 06:06,MIYAKONOJO,MIYAKONOJO_05,0.000
我想要一个基于“时间”列的新列“新” ,如下所述
如果我的时间戳介于下午 6 点(18:00)到早上 6 点(06:00)之间,则该值应为“夜间”,否则为“日”
样本输出:
PC_name,Time,Plant,Section,PC_value,New
35901052,2017-08-01 05:50,MIYAKONOJO,MIYAKONOJO_05,0.000,Night
35901052,2017-08-01 05:51,MIYAKONOJO,MIYAKONOJO_05,0.000,Night
35901052,2017-08-01 05:56,MIYAKONOJO,MIYAKONOJO_05,0.000,Night
35901052,2017-08-01 06:01,MIYAKONOJO,MIYAKONOJO_05,0.000,Day
35901052,2017-08-01 06:06,MIYAKONOJO,MIYAKONOJO_05,0.000,Day