change a cloumn datatype to datetime format

by Divyanshu Thakur   Last Updated June 25, 2019 12:02 PM - source

in my data i have a col for date and this column consists of dates in the format of both that is 02/1/19 and 01-1-19 so it is giving error if i am using this code data ['Request date']=pd.to_date time(data['Request date'],format='%d-%b-%Y')ordata['Requestdate']=pd.to_datetime(data['RequeDate'],format='%d/%b/%Y')how to use the both the formats in one single line of command.what should I DO?

Tags : python pandas


Related Questions



Matrix with Python and Pandas

Updated June 04, 2019 06:02 AM

Installing Pandas under python 3.7.3

Updated June 24, 2019 07:02 AM

Cannot import Numpy and Pandas

Updated January 30, 2019 16:02 PM

Ho I can create a function for my code?

Updated June 18, 2019 09:02 AM