CLN: Replace '.format' with f-strings in some test files #29547
Updates the below 2 test files to use f-strings (fast and preferred) instead of '.format' (old and slow)

1) pandas/tests/reshape/test_reshape.py
2) pandas/tests/scalar/period/test_period.py
 
For more details on the issue, refer: https://github.com/pandas-dev/pandas/issues/29547

- [x] tests passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`