PyArrow strptime 纳秒

发布于 2025-01-17 01:12:32 字数 241 浏览 3 评论 0原文

有想法通过 pyarrow 包方法解析像 10:12:12.123456789 这样的字符串时间吗?

br

尝试过类似的事情但没有成功 pc.strptime(pa.array(["10:12:00.123"]), format="%H:%M:%S.%f", unit="ms") 回报 ArrowInvalid:无法将字符串:“10:12:00.123”解析为时间戳[ms]类型的标量

Any idea to parse string time like 10:12:12.123456789 through pyarrow package methods ?

br

tried things like this without success
pc.strptime(pa.array(["10:12:00.123"]), format="%H:%M:%S.%f", unit="ms")
returns
ArrowInvalid: Failed to parse string: '10:12:00.123' as a scalar of type timestamp[ms]

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

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

发布评论

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

评论(1

痴情换悲伤 2025-01-24 01:12:32

pyarrow 尚不支持解析秒的小数部分。计划提供支持 (https://issues.apache.org/jira/browse/ARROW- 15883)并且解析器的其他部分正在进行中。我猜测这将包含在 8.0.0 或 9.0.0 中,但这只是一个猜测。

pyarrow doesn't support parsing of fractional seconds yet. Support is planned (https://issues.apache.org/jira/browse/ARROW-15883) and there is ongoing work on other parts of the parser. I'd guess this will be included in 8.0.0 or 9.0.0 but it's just a guess.

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