From 093efdaff3eae5958d2c201bc1b4622fc84e8938 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 18 Jun 2024 15:56:23 +0200 Subject: [PATCH] MINOR: [Python][Docs] Fix mention of default for coerce_timestamps keyword in reading Parquet (#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 Signed-off-by: Joris Van den Bossche --- python/pyarrow/parquet/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/pyarrow/parquet/core.py b/python/pyarrow/parquet/core.py index eaff79c8b137c..bc7cc342aea7e 100644 --- a/python/pyarrow/parquet/core.py +++ b/python/pyarrow/parquet/core.py @@ -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