Skip to content

Commit

Permalink
SNOW-1737253: Update docs for tz_convert/tz_localize variants to spec…
Browse files Browse the repository at this point in the history
…ify supported timezone formats (#2453)

<!---
Please answer these questions before creating your pull request. Thanks!
--->

1. Which Jira issue is this PR addressing? Make sure that there is an
accompanying issue to your PR.

   <!---
   In this section, please add a Snowflake Jira issue number.

Note that if a corresponding GitHub issue exists, you should still
include
   the Snowflake Jira issue number. For example, for GitHub issue
#1400, you should
   add "SNOW-1335071" here.
    --->

   Fixes SNOW-1737253

2. Fill out the following pre-review checklist:

- [ ] I am adding a new automated test(s) to verify correctness of my
new code
- [ ] If this test skips Local Testing mode, I'm requesting review from
@snowflakedb/local-testing
   - [ ] I am adding new logging messages
   - [ ] I am adding a new telemetry message
   - [ ] I am adding new credentials
   - [ ] I am adding a new dependency
- [ ] If this is a new feature/behavior, I'm adding the Local Testing
parity changes.
- [ ] I acknowledge that I have ensured my changes to be thread-safe.
Follow the link for more information: [Thread-safe Developer
Guidelines](https://docs.google.com/document/d/162d_i4zZ2AfcGRXojj0jByt8EUq-DrSHPPnTa4QvwbA/edit#bookmark=id.e82u4nekq80k)

3. Please describe how your code solves the related issue.

Update docs for tz_convert/tz_localize variants to specify supported
timezone formats.
  • Loading branch information
sfc-gh-helmeleegy authored Oct 17, 2024
1 parent 2e33301 commit 016b063
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

- Improved generated SQL query for `head` and `iloc` when the row key is a slice.
- Improved error message when passing an unknown timezone to `tz_convert` and `tz_localize` in `Series`, `DataFrame`, `Series.dt`, and `DatetimeIndex`.
- Improved documentation for `tz_convert` and `tz_localize` in `Series`, `DataFrame`, `Series.dt`, and `DatetimeIndex` to specify the supported timezone formats.

#### Bug Fixes

Expand Down
15 changes: 11 additions & 4 deletions docs/source/modin/supported/dataframe_supported.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,17 @@ Methods
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``truncate`` | N | | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_convert`` | P | ``axis``, ``level``, ``copy`` | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_localize`` | P | ``axis``, ``level``, ``copy``, | |
| | | ``ambiguous``, ``nonexistent`` | |
| ``tz_convert`` | P | ``axis``, ``level``, ``copy`` | ``N`` if timezone format is not supported. |
| | | | Only timezones listed in ``pytz.all_timezones`` are|
| | | | supported. For example, ``UTC`` is supported but |
| | | | ``UTC+/-<offset>``, such as ``UTC+09:00``, is not |
| | | | supported. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_localize`` | P | ``axis``, ``level``, ``copy`` | ``N`` if timezone format is not supported. |
| | | ``ambiguous``, ``nonexistent`` | Only timezones listed in ``pytz.all_timezones`` are|
| | | | supported. For example, ``UTC`` is supported but |
| | | | ``UTC+/-<offset>``, such as ``UTC+09:00``, is not |
| | | | supported. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``unstack`` | P | ``sort`` | ``N`` for non-integer ``level``. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
Expand Down
14 changes: 11 additions & 3 deletions docs/source/modin/supported/datetime_index_supported.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,17 @@ Methods
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``snap`` | N | | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_convert`` | Y | | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_localize`` | P | ``ambiguous``, ``nonexistent`` | |
| ``tz_convert`` | P | | ``N`` if timezone format is not supported. |
| | | | Only timezones listed in ``pytz.all_timezones`` are|
| | | | supported. For example, ``UTC`` is supported but |
| | | | ``UTC+/-<offset>``, such as, ``UTC+09:00`` is not |
| | | | supported. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_localize`` | P | ``ambiguous``, ``nonexistent`` | ``N`` if timezone format is not supported. |
| | | | Only timezones listed in ``pytz.all_timezones`` are|
| | | | supported. For example, ``UTC`` is supported but |
| | | | ``UTC+/-<offset>``, such as, ``UTC+09:00`` is not |
| | | | supported. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``round`` | P | ``ambiguous``, ``nonexistent`` | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
Expand Down
11 changes: 11 additions & 0 deletions docs/source/modin/supported/series_dt_supported.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,19 @@ the method in the left column.
+-----------------------------+---------------------------------+----------------------------------------------------+
| ``to_pydatetime`` | N | |
+-----------------------------+---------------------------------+----------------------------------------------------+
| ``tz_convert`` | P | ``N`` if timezone format is not supported. |
| | | Only timezones listed in ``pytz.all_timezones`` are|
| | | supported. For example, ``UTC`` is supported but |
| | | ``UTC+/-<offset>``, such as ``UTC+09:00``, is not |
| | | supported. |
+-----------------------------+---------------------------------+----------------------------------------------------+
| ``tz_localize`` | P | ``N`` if `ambiguous` or `nonexistent` are set to a |
| | | non-default value. |
| | | ``N`` if timezone format is not supported. |
| | | Only timezones listed in ``pytz.all_timezones`` are|
| | | supported. For example, ``UTC`` is supported but |
| | | ``UTC+/-<offset>``, such as ``UTC+09:00``, is not |
| | | supported. |
+-----------------------------+---------------------------------+----------------------------------------------------+
| ``tz_convert`` | Y | |
+-----------------------------+---------------------------------+----------------------------------------------------+
Expand Down
15 changes: 11 additions & 4 deletions docs/source/modin/supported/series_supported.rst
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,17 @@ Methods
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``truncate`` | N | | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_convert`` | P | ``axis``, ``level``, ``copy`` | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_localize`` | P | ``axis``, ``level``, ``copy``, | |
| | | ``ambiguous``, ``nonexistent`` | |
| ``tz_convert`` | P | ``axis``, ``level``, ``copy`` | ``N`` if timezone format is not supported. |
| | | | Only timezones listed in ``pytz.all_timezones`` are|
| | | | supported. For example, ``UTC`` is supported but |
| | | | ``UTC+/-<offset>``, such as, ``UTC+09:00`` is not |
| | | | supported. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``tz_localize`` | P | ``axis``, ``level``, ``copy`` | ``N`` if timezone format is not supported. |
| | | ``ambiguous``, ``nonexistent`` | Only timezones listed in ``pytz.all_timezones`` are|
| | | | supported. For example, ``UTC`` is supported but |
| | | | ``UTC+/-<offset>``, such as ``UTC+09:00``, is not |
| | | | supported. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``unique`` | Y | | |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
Expand Down

0 comments on commit 016b063

Please sign in to comment.