I have the following dataframe:
import pandas as pd
#Create DF
d = {
'Day': ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],
'Staff Count':[20,18,17,16,15,7,6,],
}
df = pd.DataFrame(data=d)
df
I would simply like to return the staff count on Mondays to a variable 20
.
I have tried:
MonStaff = df.lookup(df.index[df.Day=='Mon'],df['Staff Count'])
to no avail but I'm sure it's something simple!
Thanks in advance!