Skip to content

Commit

Permalink
MINOR: [Python][Docs] Fix mention of default for coerce_timestamps ke…
Browse files Browse the repository at this point in the history
…yword in reading Parquet (apache#41498)

### Rationale for this change

In the meantime we have updated the default for the `version` keyword from "1.0" to "2.4" and recently to "2.6", but this was not yet reflected in the description of the `coerce_timestamps` keyword.

Authored-by: Joris Van den Bossche <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
  • Loading branch information
jorisvandenbossche authored Jun 18, 2024
1 parent 370818a commit 093efda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/pyarrow/parquet/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,9 @@ def _sanitize_table(table, new_schema, flavor):
by flavor argument. This take priority over the coerce_timestamps option.
coerce_timestamps : str, default None
Cast timestamps to a particular resolution. If omitted, defaults are chosen
depending on `version`. By default, for ``version='1.0'`` (the default)
and ``version='2.4'``, nanoseconds are cast to microseconds ('us'), while
for other `version` values, they are written natively without loss
depending on `version`. For ``version='1.0'`` and ``version='2.4'``,
nanoseconds are cast to microseconds ('us'), while for
``version='2.6'`` (the default), they are written natively without loss
of resolution. Seconds are always cast to milliseconds ('ms') by default,
as Parquet does not have any temporal type with seconds resolution.
If the casting results in loss of data, it will raise an exception
Expand Down

0 comments on commit 093efda

Please sign in to comment.