DOC: fix warnings in docstrings examples for deprecated functions
- [x] closes #24525
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

I have updated all the `FutureWarning`, let me know if `PerformanceWarning` and `DtypeWarning`  shown below also needs a fix.

```zsh
python scripts/validate_docstrings.py --errors GL06,GL07,GL09,SS04,PR03,PR05,EX04
scripts/validate_docstrings.py:764: PerformanceWarning: indexing past lexsort depth may impact performance.
  errs, wrns, examples_errs = get_validation_data(doc)
scripts/validate_docstrings.py:764: PerformanceWarning: indexing past lexsort depth may impact performance.
  errs, wrns, examples_errs = get_validation_data(doc)
scripts/validate_docstrings.py:524: DtypeWarning: Columns (0) have mixed types. Specify dtype option on import or set low_memory=False.
  runner.run(test, out=f.write)
```
