STYLE: turn off PLW2901 (but keep some changes)

Continuation of work started on closed issue #51708.
Didn't find a new issue to link this PR, may I ask you @MarcoGorelli if it is fine to link it to the closed one or shall I wait for a new issue to be opened?
> thanks
> 
> can you update the pyproject.toml file accordingly please?

I will update it when I finish all the files under  `pandas/core/*`. Give me few days for it, there are quite some to change :) it's fine (and preferable) split it up into smaller chunks

we can split up the ` pandas/core/*` ignore into multiple ones > looks like the "
> Code Checks / Docstring validation, typing, and other manual pre-commit hooks (pull_request) " is failing - code you give me a ping when that's one's fixed please?

Sure, I think I know which changes might have impacted it. I will ping you around Tuesday, unfortunately I won't make it earlier. sure, no hurry, thanks! Ok, I reverted most of the changes except on few files.
Under `# intentionally turned off ` I added `"redefined-loop-name"`, but I saw the errors still appearing when running `pre-commit run ruff --all-files`, so I kept `"PLW2901"` also under the to ignore section of ruff. Please let me know if this is the correct way. Also let me know if the few changes listed are fine.

