So I have read a number of threads on this, and am still stumped. Any help would be sincerely appreciated.
I have a column in a dataframe that contains strings of dates,
No need apply
by using pd.to_datetime
pd.to_datetime(df_combined['VisitDate'],errors='coerce',format='%d-%b-%Y').fillna('')
You probably just need to assign the result back to the column itself:
df_combined['VisitDate'] = df_combined['VisitDate'].apply(lambda x: datetime.datetime.strptime(x, '%Y-%m-%d').strftime('%d-%b-%Y') if x != "" else "")