原因excel的日期格式,用pandas读入时也是时间格式,而pandas中模糊匹配函数(.str.contain)需要字符串类型。需要进行转换
data['时间'] = data['时间'].apply(lambda x:x.strftime('%Y-%m-%d'))
原因excel的日期格式,用pandas读入时也是时间格式,而pandas中模糊匹配函数(.str.contain)需要字符串类型。需要进行转换
data['时间'] = data['时间'].apply(lambda x:x.strftime('%Y-%m-%d'))