DOC: Remove multiple blank lines in ipython directives
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them

Related to #26788

This PR gets rid of all warnings of the form "UserWarning: Code input with no code at..." when building the docs. When there are multiple blank lines, e.g.

```
foo = 5


def bar():
    pass
```

one of the blank lines is reported as having no code. That said, I'm not sure if this is the right approach, as the double blank likes are PEP8 compliant.  Perhaps this should be reported upstream instead and the multiple blank lines left in the docs.

cc @jorisvandenbossche @TomAugspurger 
