DOC: Fix doc warning "Code input with no code"
xref #24173

When building the documentation `./doc/make.py html`, among other warnings we find the next:

```
/home/travis/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/IPython/sphinxext/ipython_directive.py:1020: UserWarning: Code input with no code at /home/travis/build/pandas-dev/pandas/doc/source/user_guide/advanced.rst, line 724
  warnings.warn(message)
/home/travis/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/IPython/sphinxext/ipython_directive.py:1020: UserWarning: Code input with no code at /home/travis/build/pandas-dev/pandas/doc/source/user_guide/cookbook.rst, line 1300
  warnings.warn(message)
```

All code blocks seem to have code, so it's not obvious why we get the issues. Also, the reported lines aren't probably correct. We should research why this is failing, and fix the problem.