【发布时间】:2019-11-07 08:41:16
【问题描述】:
我需要将此 '6/25/2019 10:06:49 AM' 转换为实际为对象类型的日期数据类型。
df["TIME"] = pd.to_datetime(df["TIME"], format='%m/%d/%Y %I:%M:%S %p')
我尝试过使用它,但它会引发以下错误。
AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas
【问题讨论】:
标签: pandas