DOC: Add examples for creating an index accessor
Picked up issue #49202. This adds examples for creating index, dataframe, and series accessors.
- [X] closes #49202 
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

pre-commit.ci autofix pre-commit.ci autofix pre-commit.ci autofix Can you have a look at the CI errors please? The checks are still failing, could you please fix them? Hi @datapythonista I believe we have fixed all the CI errors. Could you please re-review? /preview Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/57867/ Thanks @sjalkote 