 Example for pandas.DataFrame.to_period docs
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
Doc improvement - added the example section for pandas.DataFrame.to_period

@MarcoGorelli Please review Restarting CI - ping on green @oovk  @alimcmaster1  Thanks for the PR @oovk 