Skip to content

Commit

Permalink
GH-38145: [Docs][Python] Add tzdata on Windows subsection in Python i…
Browse files Browse the repository at this point in the history
…nstall docs (#38146)

### What changes are included in this PR?

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

* Closes: #38145

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
  • Loading branch information
AlenkaF authored Oct 10, 2023
1 parent 94b7258 commit 5d95007
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 5d95007

Please sign in to comment.