📜  将 datetime 对象格式转换为 datetime 格式 python 代码示例

📅  最后修改于: 2022-03-11 14:46:03.731000             🧑  作者: Mango

代码示例1
df['date_time']=pd.to_datetime(df['date_time'], format='%d-%m-%Y %H.%M.%S')
#fomrat given in code should match the format of the feature
#here--> df['date_time'][0]=10-03-2004 18.00.00
#watchout for the blanks  '-' '.'