Add missing period to pandas.Series.interpolate docstring
State: closed

Previously, the _new in version_ message seemed like a run-on sentence:
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.interpolate.html

Also added code formatting for `BPoly.from_derivatives` reference.

Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22217?src=pr&el=h1) Report
> Merging [#22217](https://codecov.io/gh/pandas-dev/pandas/pull/22217?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/2156431c3a673fbfb720983474d3cb4edc92c332?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #22217      +/-   ##
==========================================
+ Coverage   92.06%   92.06%   +<.01%     
==========================================
  Files         169      169              
  Lines       50694    50698       +4     
==========================================
+ Hits        46671    46676       +5     
+ Misses       4023     4022       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.47% <ø> (ø)` | :arrow_up: |
| #single | `42.32% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22217?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/22217/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.47% <ø> (ø)` | :arrow_up: |
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/22217/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `94.45% <0%> (ø)` | :arrow_up: |
| [pandas/core/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/22217/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvbWlzc2luZy5weQ==) | `91.7% <0%> (+0.04%)` | :arrow_up: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/22217/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.43% <0%> (+0.05%)` | :arrow_up: |

------

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

Alright, see if this is better. I added links to the actual scipy docs for those functions. I wasn't sure if you can do something like `:py:func:``foo.bar`` ` to add backticks in addition to the link? rST linking has never been logical or clear to me...
Not sure about the `:py:func:` I think it should be just `:func:` if they are not methods. Did you try building the documentation, and see if it renders as expected? `./doc/make.py html` should build it, and then you just need to find the `interpolate` method page in the build directory (`doc/source/build/generated` if I'm not wrong).
@datapythonista I got the `:py:func:` syntax from http://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#role-py:func.

I tried building the docs but got the following error message:
```console
$ ./make.py html
Running Sphinx v1.7.5

Configuration error:
There is a programable error in your configuration file:

Traceback (most recent call last):
  File "/Users/Adam/pandas/pandas/__init__.py", line 26, in <module>
    from pandas._libs import (hashtable as _hashtable,
  File "/Users/Adam/pandas/pandas/_libs/__init__.py", line 4, in <module>
    from .tslibs import (
  File "/Users/Adam/pandas/pandas/_libs/tslibs/__init__.py", line 4, in <module>
    from .conversion import normalize_date, localize_pydatetime, tz_convert_single
ModuleNotFoundError: No module named 'pandas._libs.tslibs.conversion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Adam/anaconda3/lib/python3.6/site-packages/sphinx/config.py", line 161, in __init__
    execfile_(filename, config)
  File "/Users/Adam/anaconda3/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "conf.py", line 140, in <module>
    import pandas
  File "/Users/Adam/pandas/pandas/__init__.py", line 35, in <module>
    "the C extensions first.".format(module))
ImportError: C extension: No module named 'pandas._libs.tslibs.conversion' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.
```
What am I missing here?
You need to build the C extensions:

```sh
python setup.py build_ext --inplace
```
Thanks, but now I'm having troubles with `cython`:
```console
$ python setup.py build_ext --inplace
running build_ext
pandas._libs.algos: -> [['pandas/_libs/algos.c']]
Traceback (most recent call last):
  File "setup.py", line 755, in <module>
    **setuptools_kwargs)
  File "/Users/Adam/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/Users/Adam/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/Adam/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/Adam/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/Adam/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "setup.py", line 369, in build_extensions
    self.check_cython_extensions(self.extensions)
  File "setup.py", line 366, in check_cython_extensions
    """.format(src=src))
Exception: Cython-generated file 'pandas/_libs/algos.c' not found.
                Cython is required to compile pandas from a development branch.
                Please install Cython or download a release package of pandas.
```
I do have `cython` installed though...
```console
$ pip install cython
Requirement already satisfied: cython in /Users/Adam/anaconda3/lib/python3.6/site-packages (0.27.3)
$ python
Python 3.6.5 |Anaconda custom (64-bit)| (default, Apr 26 2018, 08:42:37) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cython
>>> cython.__version__
'0.27.3'
```
Maybe try starting with a clean before building:

```sh
python setup.py clean --all
```

lmk
Same error message. I also tried adding the `--force` flag suggested by the previous error message.
Are you running within an activated virtual environment? Set up looks OK but maybe something surprising going on with path resolution if not
No virtual environment. I just updated Cython from 0.27.3 to 0.28.4 and it seems to be working now??
Makes sense. We just upped our min version dependency to 0.28.2
Alright, I ran:
```console
$ python make.py --num-jobs 4 --single Series.interpolate
```
and everything looks good:

<img width="1280" alt="screen shot 2018-08-07 at 3 15 40 pm" src="https://user-images.githubusercontent.com/12021217/43800038-d88217fa-9a54-11e8-98ec-49bc102dec6a.png">

However, the scipy function links aren't clickable. Is this just because it's a preview?

P.S. I also tried replacing `:py:func:` with `:func:` and it looks identical. If they both work, is `:func:` preferred?
Yes, just :func:

If you're curious, the :py: is a domain
http://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html We
use the default Python domain.

On Tue, Aug 7, 2018 at 3:19 PM Adam J. Stewart <notifications@github.com>
wrote:

> Alright, I ran:
>
> $ python make.py --num-jobs 4 --single Series.interpolate
>
> and everything looks good:
>
> [image: screen shot 2018-08-07 at 3 15 40 pm]
> <https://user-images.githubusercontent.com/12021217/43800038-d88217fa-9a54-11e8-98ec-49bc102dec6a.png>
>
> However, the scipy function links aren't clickable. Is this just because
> it's a preview?
>
> P.S. I also tried replacing :py:func: with :func: and it looks identical.
> If they both work, is :func: preferred?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/22217#issuecomment-411188477>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABQHIpkR-xUU-YINtjPKSwfrJy4n30Q8ks5uOfZYgaJpZM4VwqGB>
> .
>

@adamjstewart I think sphinx does not create the links when we build with `--single`. Not sure why, but if you build the whole documentation, it'll take longer, but it should generate the links.
@datapythonista I cleaned and rebuilt all of the docs this time but still no links. 🤷‍♂️
@adamjstewart did you check if the rest of the links (e.g. `See Also` sections) are working? For example, in `Series.astype` you've got links to other pandas methods and also to numpy. Not sure if the problem is in your environment, or in all links to scipy. Checking other links should help identify the problem.
The "See Also" links are working. Links to `numpy.where` in `pandas.DataFrame.where` are working. Links to `scipy.stats.gaussian_kde` in `pandas.DataFrame.plot.kde` are working. But the links added in this PR are not.
@datapythonista That did the trick, thanks! For the record, Sphinx creates the links even with `--single`, so no need to build _all_ the docs to test.
thanks @adamjstewart