简体   繁体   中英

How to iterate through date header of excel sheet using pandas in python?

I have an excel sheet how can i iterate through the date as i want to iterate to each row. but there are two headers. i have attached a pic below. one headers is of date. and another header is some timing in , out time, total hours, etc. so each date has 7 columns. so there are 30 days. i want to store the date some where in a variable as i can know which month is this. and then i want to read the value in the header of each date. and do some functionality. I am using python and panda library

_____________|____________|        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  |  ......................................................................................```





Did you try to find on google how to do this? You will find a lot of examples! Also you can look here: Python Loop through Excel sheets, place into one df

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM