I got a dateframe which there is one column 'brth_dt' and its type is datetime64[ns].I want to extract the age of persons,however when input:
all_df['brth_dt'].dt.year or
all_df['age'] = (pd.datetime.today().year - all_df['brth_dt'].dt.year)
coming up an error:can only use .dt accessor with datetimelike values
brth_dt columns are like this:
brth_date
1 14Oct1978
2 21Aug1970
3 06Jan1980
4 09Mar1992
any advice?thanks!