我在一个csv文件中有两列,其中一列的时间格式是hh:mm:ss,另一列是星期几,1等于星期一,7等于星期日。没有与数据关联的日期。在
我想把数据合并到一个字段中,在这个字段中时间将与一周中的某一天相关联。在
我有时间可以使用strptime:
time.strptime(fl['journey']['BeginTime'][row], "%H:%M:%S")
其格式如下:
^{pr2}$
与星期几对应的数字存储在以下变量中:
fl['journey']['Day'][row]
感谢任何帮助。在
Tags:
这应该能让你:
记住在Python中,工作日从0=Sunday开始,一直到6
相关问题 更多 >
编程相关推荐