Epyggxinpy1353 UserWarning Could not infer format so each element will be parsed individually falling back to dateutil To ensure parsing is consistent and as-expected please specify a format df2交易时间
警告信息是说在解析日期时无法确定日期的格式,因此会使用dateutil库进行解析。为了确保解析的一致性和预期,建议指定日期的格式。你可以使用pd.to_datetime函数的format参数来指定日期的格式,例如:
df2["交易时间"] = pd.to_datetime(df2["交易时间"], format="%Y-%m-%d %H:%M:%S")
在上面的例子中,日期的格式是年-月-日 时:分:秒,你可以根据实际情况进行调整。
原文地址: https://www.cveoy.top/t/topic/iymi 著作权归作者所有。请勿转载和采集!