From 4dfa21ace422805ffa1ed4950ba26dcac09a8398 Mon Sep 17 00:00:00 2001 From: Dan Homola Date: Fri, 10 Nov 2023 11:54:53 +0100 Subject: [PATCH] GH-38528: [Python][Compute] Describe strptime format semantics To prevent possible confusion with the compute strptime function, we now explicitly mention that the C/C++ semantics are followed. --- python/pyarrow/_compute.pyx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/pyarrow/_compute.pyx b/python/pyarrow/_compute.pyx index 25f77d8160ea8..5cf0d7a1d9837 100644 --- a/python/pyarrow/_compute.pyx +++ b/python/pyarrow/_compute.pyx @@ -1682,6 +1682,9 @@ class StrptimeOptions(_StrptimeOptions): ---------- format : str Pattern for parsing input strings as timestamps, such as "%Y/%m/%d". + Note that the semantics of the format follow the C/C++ strptime, not the Python one: + there can be slight differences in behavior, for example, how the "%y" placeholder + handles years with less than four digits. unit : str Timestamp unit of the output. Accepted values are "s", "ms", "us", "ns".