Fix #25099 set na_rep values before converting to string to prevent data truncation
Hi,

The code in this pull request fixes #25099, and all tests pass. However, I am not sure if this is the best (or even an elegant) solution.

The issue happened because the float `NaN` is converted to `str` (i.e. "nan"), which gets stored as a `<U3`. When the user-provided `na_rep` is used, it is first truncated down to the data type length (i.e. "myn").

I tried moving the `na_rep` to before it is converted to string, but other tests fail. I could not find other code using a similar approach, of concatenating `<U` with the desired length. So I assume it's an easy hack, but not a proper solution?

Any suggestions? I also tried setting the `na_rep` value only in the `if` branch that calls `values.astype(str)`, but there are still test failures.

Cheers
Bruno

- [x] closes #25099
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
