With Pandas I am using this answer to clean up dates with a variety of formats. This works perfectly if I filter out the dates that are prior to 1677. However my dates are historic and many date before 1677 so I get an OutOfBoundsDatetime error.
My data contains dates like:
27 Feb 1928,
1920,
October 2000,
1500,
1625,
Mar 1723
I can see a reference here to using pd.Period but I don't know how to apply it to my case as the dates need to be cleaned first before I can adapt this sample
My code to clean the dates is:
df['clean_date'] = df.dates.apply(
lambda x: pd.to_datetime(x).strftime('%m/%d/%Y'))
df
I would like help to convert and clean my dates including the historic dates. Grateful for assistance with this.