Parse multiple date formats into a single format
问题 I have one column called published (date). As you can see, it has multiple date formats and also nan values. I would like to skip nan values, convert all the other formats to %Y-%-%d, and ignore the one that has the only year. I tried df['publish_time']=pd.to_datetime(df['publish_time']) and also things like: fmt=['%Y-%m-%d', '%d-%m-%Y', '%d/%m/%Y', '%Y-%d-%m', '%Y-%d-%b', '%d-%b-%Y', '%d/%b/%Y','Year: %d; month','month: %d;Year','%Y','%b %d %Y','%b %Y %d'] but I could not solve it. Any