问题场景 时间戳转字符串,出现如题错误。 re['str_time'] = re['stamp'].apply(lambda x: time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(x))) 因为localtime期望一个second为单位的时间戳,而此处我传入的是微秒单位数据,所以出错。