I have an excel sheet as shown above with data of employees' attendance per month. There is a row with heading status which shows number of absents of an employee. Normally I would go with:
status = data.iloc[i].value_counts()
which returns the count of all the variables in that row including the heading status.
For example, the output is:
I only need the count of A(absents). How do I achieve that?
Thanks in advance!!!
CodePudding user response:
You can also access a specific value in "status" variable by:
status.loc["A"]
returns only the number of absents.