Here is the output of my code but now I want to extract the values of Check_In and Check_Out in variables so that I can perform own these values any suggestions on how to extract the values?
ID Name Check_In Check_Out
1 Zainab 7 am 5 pm
2 Abdullah 8 am 5 pm
3 Hassan 9 am 6 pm
4 Javeria 11 am 9 pm
5 Tayyab 7 am 5 pm
6 Fatima 11 am 9 pm
This is my code below:
import pandas as pd
import numpy as np
df = pd.read_csv("Book1.csv")
c = df.set_index('ID')
print(c)
f = int(input('Give ID number:' ))
t = (pd.DataFrame((c.loc[f])))
print(t)
This is the prompt:
Give ID number:2
>> 2
Name Abdullah
Check_In 8am
Check_Out 5pm