I have a code in python to extract year+semester from a datetime column in a dataframe:
df['semester'] = df.date.dt.year.astype(str) + ' Semester=' + np.where(df.date.dt.quarter>2,2,1).astype(str)
date
2021-01-01
and the output is:
semester
2021 Semester=1
What's the fasted way to extract semester from a datetime column in julia?