DOC: Implementing single doc building for api docs
Same as #19840, using @jorisvandenbossche approach, but using the --single attribute instead of separate functionality for docstrings.

Thanks, will take a look this weekend. 
Reusing index.rst instead of my temp.rst is a nice idea!

Functionality wise, I think you dropped the multiple docstrings at once? Yes, but I think it should be easy to restore it with this approach, just wanted to share the idea first, before going into too much detail with the code.

Functionality wise, I don't think it works with this PR, but building the pdf for a single docstring should be "trivial" to have with this method.

I find this method simpler, that's why I wanted to test it, and I prefer it if there is no drawback I missed. For the rest they should be almost the same. @datapythonista I just worked a bit further on it on the train, and added your commit to my other PR and made some further changes (I basically just added back the copying of existing generated rst file, because those are in some cases more correct). See https://github.com/pandas-dev/pandas/pull/19840 Closing this one in favor of #19840