Skip to content

Commit

Permalink
apacheGH-38528: [Python][Compute] Describe strptime format semantics (a…
Browse files Browse the repository at this point in the history
…pache#38665)

### Rationale for this change

To prevent possible confusion with the compute strptime function, we now explicitly mention that the C/C++ semantics are followed.

### What changes are included in this PR?

The documentation of the `format` parameter of the `strptime` function is expanded.

### Are these changes tested?

N/A documentation change only.

### Are there any user-facing changes?

Just the documentation.
* Closes: apache#38528

Lead-authored-by: Dan Homola <[email protected]>
Co-authored-by: Dan Homola <[email protected]>
Co-authored-by: Rok Mihevc <[email protected]>
Signed-off-by: Rok Mihevc <[email protected]>
  • Loading branch information
3 people authored Nov 13, 2023
1 parent aa9f8ec commit 79c72a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/pyarrow/_compute.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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 are 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".
Expand Down

0 comments on commit 79c72a6

Please sign in to comment.