1BY20IS415 - Python Assignment (Attendance Percentage) - Jupyter Notebook
1BY20IS415 - Python Assignment (Attendance Percentage) - Jupyter Notebook
In [1]:
import pandas as pd
In [2]:
df = pd.read_csv(r"Attendance.csv.csv")
In [3]:
print(df)
In [4]:
df.replace(to_replace ="P",
value = "1",
inplace = True)
In [5]:
print(df)
In [6]:
df.replace(to_replace ="A",
value = "0",
inplace = True)
print(df)
In [7]:
df['01-01'] = df['01-01'].astype(int)
In [8]:
df['02-01'] = df['02-01'].astype(int)
df['03-01'] = df['03-01'].astype(int)
df['04-01'] = df['04-01'].astype(int)
df['05-01'] = df['05-01'].astype(int)
df['06-01'] = df['06-01'].astype(int)
In [9]:
print(df)
In [10]:
In [ ]: