Skip to content

Commit

Permalink
Quarter offset implemented (base is now latest pydata-master). (#2721)
Browse files Browse the repository at this point in the history
* Quarter offset implemented (base is now latest pydata-master).

* Fixed issues raised in review (#2721 (review))

* Updated whats-new.rst with info on quarter offset support.

* Updated whats-new.rst with info on quarter offset support.

* Update doc/whats-new.rst

Co-Authored-By: jwenfai <jwenfai@gmail.com>

* Added support for quarter frequencies when resampling CFTimeIndex. Less redundancy in CFTimeIndex resampling tests.

* Removed normalization code (unnecessary for cftime_range) in cftime_offsets.py. Removed redundant lines in whats-new.rst.

* Removed invalid option from _get_day_of_month docstring. Added tests back in that raises ValueError when resampling (base=24 when resampling to daily freq, e.g., '8D').

* Minor edits to docstrings/comments

* lint
  • Loading branch information
jwenfai authored and spencerkclark committed Mar 2, 2019
1 parent 612d390 commit 627a881
Show file tree
Hide file tree
Showing 5 changed files with 558 additions and 106 deletions.
4 changes: 3 additions & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Enhancements
- :py:meth:`pandas.Series.dropna` is now supported for a
:py:class:`pandas.Series` indexed by a :py:class:`~xarray.CFTimeIndex`
(:issue:`2688`). By `Spencer Clark <https://github.com/spencerkclark>`_.
- :py:meth:`~xarray.cftime_range` now supports QuarterBegin and QuarterEnd offsets (:issue:`2663`).
By `Jwen Fai Low <https://github.com/jwenfai>`_
- :py:meth:`~xarray.open_dataset` now accepts a ``use_cftime`` argument, which
can be used to require that ``cftime.datetime`` objects are always used, or
never used when decoding dates encoded with a standard calendar. This can be
Expand All @@ -76,7 +78,7 @@ Enhancements
serialization warnings raised if dates from a standard calendar are found to
be outside the :py:class:`pandas.Timestamp`-valid range (:issue:`2754`). By
`Spencer Clark <https://github.com/spencerkclark>`_.

Bug fixes
~~~~~~~~~

Expand Down
Loading

0 comments on commit 627a881

Please sign in to comment.