DOC: Adding offsets to API ref
State: closed

- [x] closes #24436

Adding Date Offsets API documentation. Added in the same format as other sections. Detected what are properties and what are methods with the `callable` function. The order of the classes is the one already used. The order inside properties and methods is alphabetical.

@jreback In `timeseries.rst` we already have a table with the different offsets: https://pandas-docs.github.io/pandas-docs-travis/timeseries.html#dateoffset-objects Not sure what would you like to add more.

This is how it looks like:
![offsets](https://user-images.githubusercontent.com/10058240/50459176-cfd71300-0960-11e9-9157-eb01f4f62702.png)

CC: @mroeschke @jbrockmendel 

Labels:
name: Docs

Comments:
Is it possible to give `Properties` and `Methods` a different (smaller) heading style than the offset class? It's a bit difficult to pick out the offset from those two headings.
Totally agree, but I think the short answer is no.

I copied the format of: https://pandas-docs.github.io/pandas-docs-travis/api.html#scalars

IMO, what we should do is split the API page in several sections (see the sections in the "API Reference" block in https://pandas-dev.github.io/pandas-sphinx-theme/pr-datapythonista_base/, but possibly with all Index classes in the same section). Then we should have at least one extra level of title/subtitle..., and we'll be able to do it.

Will open an issue soon, and see if there is agreement.
> @jreback In timeseries.rst we already have a table with the different offsets: https://pandas-docs.github.io/pandas-docs-travis/timeseries.html#dateoffset-objects Not sure what would you like to add more.

it didn’t have clickable links before 

ah, I see, thanks for clarifying. But that's somehow unrelated, the class pages already existed, it's just that they are not links.

I'll add those in a separate PR. 
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=h1) Report
> Merging [#24446](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8b4b38fd7995cb59b0595f2d06cb4b984b5886a9?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24446   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         163      163           
  Lines       51977    51977           
=======================================
  Hits        47979    47979           
  Misses       3998     3998
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.71% <ø> (ø)` | :arrow_up: |
| #single | `42.99% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=footer). Last update [8b4b38f...29a5b5b](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=h1) Report
> Merging [#24446](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8b4b38fd7995cb59b0595f2d06cb4b984b5886a9?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24446   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         163      163           
  Lines       51977    51977           
=======================================
  Hits        47979    47979           
  Misses       3998     3998
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.71% <ø> (ø)` | :arrow_up: |
| #single | `42.99% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=footer). Last update [8b4b38f...29a5b5b](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=h1) Report
> Merging [#24446](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8b4b38fd7995cb59b0595f2d06cb4b984b5886a9?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24446   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         163      163           
  Lines       51977    51977           
=======================================
  Hits        47979    47979           
  Misses       3998     3998
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.71% <ø> (ø)` | :arrow_up: |
| #single | `42.99% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=footer). Last update [8b4b38f...29a5b5b](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=h1) Report
> Merging [#24446](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8b4b38fd7995cb59b0595f2d06cb4b984b5886a9?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24446   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         163      163           
  Lines       51977    51977           
=======================================
  Hits        47979    47979           
  Misses       3998     3998
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.71% <ø> (ø)` | :arrow_up: |
| #single | `42.99% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=footer). Last update [8b4b38f...29a5b5b](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=h1) Report
> Merging [#24446](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8b4b38fd7995cb59b0595f2d06cb4b984b5886a9?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24446   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         163      163           
  Lines       51977    51977           
=======================================
  Hits        47979    47979           
  Misses       3998     3998
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.71% <ø> (ø)` | :arrow_up: |
| #single | `42.99% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=footer). Last update [8b4b38f...29a5b5b](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=h1) Report
> Merging [#24446](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8b4b38fd7995cb59b0595f2d06cb4b984b5886a9?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24446   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         163      163           
  Lines       51977    51977           
=======================================
  Hits        47979    47979           
  Misses       3998     3998
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.71% <ø> (ø)` | :arrow_up: |
| #single | `42.99% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24446?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/24446?src=pr&el=footer). Last update [8b4b38f...29a5b5b](https://codecov.io/gh/pandas-dev/pandas/pull/24446?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Created #24448 for the links.
I "autogenerated" them, would you prefer to generate the content of `api.rst` dynamically? If we do it for date offsets, it probably makes sense to do it for everything.

Regarding the private methods, sphinx will warn (and eventually we'll make it fail for warnings). So it'd probably be a better option to just rename them to `_isAnchored` (or `_is_anchored`) and `_nanos`. Is there any reason to not do that?

Related to this PR, I created #24451 to split `api.rst` in multiple files.
this is fine for now (and ok on the splitting).