>>> import datetime
>>> today = datetime.datetime.now()
>>> print today
2009-03-06 15:37:02.484000
>>> today.strftime('%j')
'065'
from datetime import datetime
day_of_year = datetime.now().timetuple().tm_yday
df['day_of_year'] = df['date_given'].dt.dayofyear
print(df)