秘密的时间到了DateTime

发布于 2025-01-22 21:09:14 字数 515 浏览 3 评论 0原文

我有一个包含开始日期的Excel文件:24/09/2021,开始时间:16:13:48,测试长度[D:H:M]:06:17:25。

每5分钟开始启动时间后,将数据保存在PM中。

我想将此经过的时间转换为DateTime(24/09/2021 16:18:00),考虑到开始的开始时间和开始日期,或者在整个测试期间,如下

任何帮助将不胜感激。

I have an excel file that contains the start date: 24/09/2021, start time: 16:13:48, The Test Length [D:H:M]: 06:17:25.

The data are saved for PM in Elapsed time after the start time every 5 minutes.
enter image description here

I would like to convert this Elapsed time to DateTime(24/09/2021 16:18:00), considering the start time and start date either in pandas or Excel for the whole test duration as below

enter image description here

Any help would be appreciated.

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

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

发布评论

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

评论(1

没有你我更好 2025-01-29 21:09:15

使用 >带有Origin单位参数:

df['Elapsed Time [s]'] = pd.to_datetime(df['Elapsed Time [s]'],
                                        origin='24/09/2021 16:13:48',
                                        unit='s')

Use to_datetime with origin and unit parameters:

df['Elapsed Time [s]'] = pd.to_datetime(df['Elapsed Time [s]'],
                                        origin='24/09/2021 16:13:48',
                                        unit='s')
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文