[英]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.