Python Forum
How to find employees clocked in at two different locations
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to find employees clocked in at two different locations
#1
So I have this software that shows me when employees at various store locations are clocked in or out. It will spit out the data in either excel format or CSV format, at the moment I'm thinking CSV format since it might be overall easier to parse. The only downside is that the CSV doesn't have the date range in the specific cell which I originally used for a different automation program to sus out a date range..anyways I'm getting ahead of myself.

Basically I will just say the CSV file data will look probably like something this after I clean it up
(very short section of the data, sorry if formatting sucks, just imagine a clean table, couldn't find the write formatting tool in the toolbar to make it pretty)

[Store] [ID] [Name] [Day] [Date] [ClockIn] [ClockOut]
Store 3 1492 John Doe Mon 8/8/2022 8:55:32 AM 11:12:35 AM
Store 3 1492 John Doe Mon 8/8/2022
Store 3 1492 John Doe Mon 8/8/2022 11:44:08 AM 5:00:05 PM
Store 4 1492 John Doe Sat 8/13/2022 8:55:47 AM 10:31:39 AM
Store 4 1492 John Doe Sat 8/13/2022
Store 4 1492 John Doe Sat 8/13/2022 11:06:17 AM 5:30:54 PM

I just need to find a way to see when John Doe was clocked in at both Store 3 and Store 4 at the same time on the same day, assuming he was.
I just wonder what tools would I consider to put me on the right track? I was looking at different datetime tools
datetimerange
or
pd.date_range
for starters. I just need a starting direction since my head isn't wrapping itself around this properly. Most likely I'll be importing the CSV file into Jupyter Notebooks and using iPython to manage it block by block, and implementing pandas and maybe even xlwings to handle the excel side of it.

For example, in my last program the excel file had a string in an excel cell that looked like "Aug 07, 2022 thru Aug 13, 2022" and I assigned it to a variable DataString and then did
pd.date_range(*map(pd.to_datetime, DateString.split(' thru ')))
and was able to use that date range output to manage the data. But I feel like a different approach would be better for this data.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using locationtagger to extract locations found in a specific country/region lord_of_cinder 1 1,288 Oct-04-2022, 12:46 AM
Last Post: Larz60+
  Installing Numpy multiple locations dwhe 4 3,157 Dec-21-2019, 02:02 AM
Last Post: dwhe
  transfering files between server locations using ftplib katesfb 1 2,019 Nov-11-2019, 12:24 AM
Last Post: katesfb

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020