-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
The dateutil packages also provides a set of timezone objects (https://dateutil.readthedocs.io/en/stable/tz.html) in addition to pytz. In pyarrow, we only support pytz timezones (and the stdlib datetime.timezone fixed offset):
In [2]: import dateutil.tz
In [3]: import pyarrow as pa
In [5]: pa.timestamp('us', dateutil.tz.gettz('Europe/Brussels'))
...
~/miniconda3/envs/dev37/lib/python3.7/site-packages/pyarrow/types.pxi in pyarrow.lib.tzinfo_to_string()
ValueError: Unable to convert timezone `tzfile('/usr/share/zoneinfo/Europe/Brussels')` to stringBut pandas also supports dateutil timezones. As a consequence, when having a pandas DataFrame that uses a dateutil timezone, you get an error when converting to an arrow table.
Reporter: Joris Van den Bossche / @jorisvandenbossche
Assignee: Alenka Frim / @AlenkaF
Watchers: Rok Mihevc / @rok
Related issues:
- [Python] pa.lib.tzinfo_to_string(tz) throws ValueError: Unable to convert timezone
tzoffset(None, -14400)to string (duplicates) - [Python] support dateutil timezones (duplicates)
- [Python] Recognize datetime.timezone.utc as UTC on conversion python->pyarrow (relates to)
PRs and other links:
Note: This issue was originally created as ARROW-5248. Please see the migration documentation for further details.