CLN: GH29547 replace old string formatting
Hi there! This is my first contribution. Please let me know if there are any issues, thank you.
- [x] tests passed
- [x] passes `black pandas`

Thanks @pcandoalmeida  Thanks @simonjayhawkins 