strftime从date类型转换成字符串类型 data中date列(sysdate)提取其中的年月日信息到新的列(date_key) data['date_key'] = data.sysdate.map(lambda x: x.strftime('%Y-%m-%d')) 将字符串列转换成date列 1、pd.to_datetime data