After sucking names and hours worked out of a csv file is search for anyone working more the 46 hours. Once i find them how do i rejoin hours with person.
df = pd.read_csv('C:/Users/richard/EWW/Team_ Terran - Richard_2022-05-01_2022-05-31)
#"Full name" and "Hours" are column headers
agg_hours = df.groupby(['Full name'])['Hours'].sum()
FullName = list(dict.fromkeys(FullName))
print(agg_hours)
Full name
Adam T 40.00
Bryan F 42.75
Dylan S 43.00
Eric E 16.00
Henry N 48.50
Jacob M 42.00
Johnny T 49.25
Paras M 15.50
Paul C 50.00
Reed W 49.75
Sid M 6.00
Vir P 46.50
Name: Hours, dtype: float64
for i in range(12):
hrs=agg_hours[i]
if hrs > 46:
print(hrs)
48.5
49.25
50.0
49.75
46.5