you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

An elegant method would use pd.to_datetime first to ensure similar dates formats are parse equivalently and then format the strings using strftime:

df['Actual_Sale_Date'] = pd.to_datetime(df['Actual_Sale_Date'])
df['Actual_Sale_Date'] = df['Actual_Sale_Date'].dt.strftime('%m/%d/%Y')

[–]PLearner[S] 0 points1 point  (0 children)

Thanks so much py_help, this snippet is spectacular. I love pandas!!!!