Creating an age column based on the year of birth

PHOTO EMBED

Tue May 21 2024 08:41:18 GMT+0000 (Coordinated Universal Time)

Saved by @Uncoverit #python

# Creating an age column based on the year of birth
current_year = dt.datetime.now().year
df['Age'] = current_year - df['Year_Birth']
content_copyCOPY