![](/img/trans.png)
[英]Iterate with loop through excel sheet and store values in variables using Python
[英]How to iterate through date header of excel sheet using pandas in python?
我有一张Excel工作表,因为要迭代到每一行,我该如何迭代日期。 但是有两个标题。 我在下面附了一张图片。 一个标题是最新的。 另一个标题是进,出时间,总时数等时间,因此每个日期都有7列。 所以有30天 我想将日期存储在变量中的某些位置,因为我可以知道这是哪个月。 然后我想读取每个日期的标题中的值。 并执行一些功能。 我正在使用python和panda库
_____________|____________| 7/16/19 | 8/16/19 | 9/16/19 | 10/16/19 | 11/16/19 | ....
Employee Name|Employee ID |in-time|out-time|total-hours|status||in-time|out-time|total-hours|status||in-time|out-time|total-hours|status|in-time|out-time|total-hours|status||in-time|out-time|total-hours|status|
Shrey | SHAA | 5:00 | 13:00 |8 | WO | ..................................................................................
asd | dh | ...................................................................................
asf | ge | ....................................................................................
asdfd | ew | ...................................................................................
afdsfds | er | ......................................................................................```
您是否尝试在Google上找到如何执行此操作? 您会发现很多例子! 您也可以在这里查看: Python在Excel工作表中循环,放入一个df中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.