尝试根据时间过滤时间序列。
df6=df5.loc[df5['Time']<'06:29:00.000']
我尝试了上面的代码,但是它返回了所有值。 这是数据集摘录
col_val = ["Unnamed: 0", "Unnamed: 0.1", "Date", "Time", "INV-1DC POWER", "INV-1AC POWER"]
values = [[ 375,375, 01-04-18, 2018-04-01 06:26:00.000, 4.0, 3.0],[376,376, 01-04-18,2018-04-01 06:27:00.000,4.0,4.0],[377,377,01-04-18,2018-04-01 06:28:00.000,2.0,4.0],[378,378,01-04-18,2018-04-01 06:29:00.003,3.0,0.0]]
df5= df = pd.DataFrame(colVals, columns=colNames)