Skip to content

Commit

Permalink
apacheGH-38145: [Docs][Python] Add tzdata on Windows subsection in Py…
Browse files Browse the repository at this point in the history
…thon install docs (apache#38146)

### What changes are included in this PR?

The option to set custom path to timezone database through python API has been implemented in apache#35600 and is documented in `docs/source/python/install.rst` with this PR.

* Closes: apache#38145

Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
  • Loading branch information
AlenkaF authored and dgreiss committed Feb 17, 2024
1 parent 5c6aeae commit 842627d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/source/python/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,20 @@ Optional dependencies

Additional packages PyArrow is compatible with are :ref:`fsspec <filesystem-fsspec>`
and **pytz**, **dateutil** or **tzdata** package for timezones.

tzdata on Windows
^^^^^^^^^^^^^^^^^

While Arrow uses the OS-provided timezone database on Linux and macOS, it requires a
user-provided database on Windows. To download and extract the text version of
the IANA timezone database follow the instructions in the C++
:ref:`download-timezone-database`.

By default, the timezone database will be detected at ``%USERPROFILE%\Downloads\tzdata``.
If the database has been downloaded in a different location, you will need to set
a custom path to the database from Python:

.. code-block:: python
>>> import pyarrow as pa
>>> pa.set_timezone_db_path("custom_path")

0 comments on commit 842627d

Please sign in to comment.