import datetime
import numpy as np


def func(x):
try:
return str(datetime.datetime.strptime(str(x)[:14], '%Y%m%d%H%M%S'))
except:
return np.NaN


df['交易时间戳'] = df['交易时间戳'].apply(lambda x: func(x))
print(df)

相关文章:

  • 2022-02-08
  • 2021-12-21
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-12-05
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案