Create a 'Y' alias for date_range yearly frequency 
State: closed

 - [x] closes #9313
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master -u -- "*.py" | flake8 --diff``
 - [ ] whatsnew entry
 - [ ] Add alias 'Y' to docs. 

What's the best place to introduce this in docs? 

Moreover, note the inference still infers a year to 'A'. 

Labels:
name: Enhancement
name: Frequency
description: DateOffsets

Comments:
Hello @imih! Thanks for updating the PR.





Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on July 16, 2017 at 07:05 Hours UTC
A minor style error on Travis <a href="https://travis-ci.org/pandas-dev/pandas/jobs/253999549#L1778">here</a>.  If you could patch that and address my comment <a href="https://github.com/pandas-dev/pandas/pull/16958#discussion_r127594872">above</a>, this will be good to go for merging!
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=h1) Report
> Merging [#16958](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/148e038bfaf2a3893b52e28b6469cf5984eec794?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16958/graphs/tree.svg?token=eZ4WkYLtcO&width=650&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16958      +/-   ##
==========================================
- Coverage   90.99%   90.96%   -0.03%     
==========================================
  Files         161      161              
  Lines       49290    49290              
==========================================
- Hits        44851    44839      -12     
- Misses       4439     4451      +12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.74% <100%> (-0.01%)` | :arrow_down: |
| #single | `40.2% <100%> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/tseries/frequencies.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvZnJlcXVlbmNpZXMucHk=) | `96.63% <100%> (+0.01%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/plotting/\_timeseries.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL190aW1lc2VyaWVzLnB5) | `60.2% <0%> (-0.53%)` | :arrow_down: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `82.52% <0%> (-0.21%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.76% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `86.89% <0%> (ø)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.89% <0%> (ø)` | :arrow_up: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `95.96% <0%> (+0.06%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=footer). Last update [148e038...4460d8f](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=h1) Report
> Merging [#16958](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/148e038bfaf2a3893b52e28b6469cf5984eec794?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16958/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&height=150&width=650)](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16958      +/-   ##
==========================================
- Coverage   90.99%   90.96%   -0.03%     
==========================================
  Files         161      161              
  Lines       49290    49290              
==========================================
- Hits        44851    44839      -12     
- Misses       4439     4451      +12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.74% <100%> (-0.01%)` | :arrow_down: |
| #single | `40.2% <100%> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/tseries/frequencies.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvZnJlcXVlbmNpZXMucHk=) | `96.63% <100%> (+0.01%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/plotting/\_timeseries.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL190aW1lc2VyaWVzLnB5) | `60.2% <0%> (-0.53%)` | :arrow_down: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `82.52% <0%> (-0.21%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.76% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.89% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `86.89% <0%> (ø)` | :arrow_up: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `95.96% <0%> (+0.06%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=footer). Last update [148e038...d5895d9](https://codecov.io/gh/pandas-dev/pandas/pull/16958?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

- [x] fixed the nit
- [x] fixed the linting problem reported by Travis 
Thanks @imih !
this needs an update to freq table in timeseries.rst and tests using this in date_range itself

pls create a new issue for follow up 
also a whatsnew
and no testing for YS
maybe best to revert this and incorporate to new PR that is complete
@jreback : I agree that that would be best here.
@imih : Sorry for the premature merge there.  Will put up a new PR that is a more complete.
> and no testing for YS

@jreback : What do you mean by this?


YS should be tested like AS

> On Jul 16, 2017, at 6:05 AM, gfyoung <notifications@github.com> wrote:
> 
> and no testing for YS
> 
> What do you mean by this?
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.
>