Time 时间索引

Time 时间索引,time,indexing,pandas,Time,Indexing,Pandas,我有一个csv文件,如下所示: "06/09/2013 14:08:34.930","7.2680542849633447","1.6151231744362988","0","0","21","1546964992","15.772567829158248","1577332736","8360","21.400382061280961","0","15","0","685","0","0","0","0","0","0","0","4637","0" csv包括1个月的每日值(24小时)

我有一个csv文件,如下所示:

"06/09/2013 14:08:34.930","7.2680542849633447","1.6151231744362988","0","0","21","1546964992","15.772567829158248","1577332736","8360","21.400382061280961","0","15","0","685","0","0","0","0","0","0","0","4637","0"
csv包括1个月的每日值(24小时)

我需要将其加载到pandas,然后获取一些数据统计数据(最小值、最大值),但我需要数据包括所有工作时间(8:00到18:00之间)的数据记录

我是熊猫图书馆的新手

加载您的数据:

import pandas as pd
from datetime import datetime
df = pd.read_csv('data.csv', header=None, index_col=0)
筛选8:00至18:00工作时间的数据:

work_hours = lambda d: datetime.strptime(d, '%d/%m/%Y %H:%M:%S.%f').hour in range(8, 18)
df = df[map(work_hours, df.index)]
获取第一个数据列的最小值和最大值:

min, max = df[1].min(), df[1].max()

您能提供更多信息和数据集的一行以上吗?我建议将工时lambda和map替换为
中间时间
,这是直接的,切中要害的: