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`
LGTM It is my first contribution to the pandas library and I am all excited :)
Thanks for the review @jbrockmendel and thanks for adding the label @MomIsBestFriend. @vandana-iyer Thank you for the PR :) thanks @vandana-iyer 