尝试从日期时间对象中删除秒

发布于 2025-01-16 20:59:13 字数 1469 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月光色 2025-01-23 20:59:13

不幸的是我还不能发表评论,否则我会发表评论的。

看看这个SO问题,你似乎犯了一个拼写错误,需要df['time'] = df['time'].dt.floor('T') 其中区别是 dt 而不是 df 介于两者之间点。

I unfortunately can't comment yet, otherwise I would've commented.

Looking at this SO question it seems you have made a typo and need df['time'] = df['time'].dt.floor('T') where the difference is the dt instead of the df in between the dots.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文