Here's how my file looks like
Name Gender Birth Death
John Male 1940 1990
Steve Male 1953 1985
John Male 1933 1965
Sara Female 1917 1955
I have tried these methods and getting some errors.
file = pd.read_csv('file')
df.insert(6, "Age", file['Death - Birth'])
age = pd.Series([])
and
for i in range(len(df)):
age[i] = df['Death Year - Birth Year']
I want to add a age column which would calculate the age based on birth and death year.