BUG: histogram weights aren't dropped if NaN values in data
- [x] closes #48884
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

I've created a test where a df and set of weights are made, and one value in each column of df is set to NaN. I then make a copy of the df without the NaNs, and copies of weights with the corresponding weights dropped. It then checks that histograms made using each pair have the same heights. Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen. > Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

Will merge main now. I addressed the comments above but haven't had a response. It also occurs to me that `weights` itself might work better as a dict or DataFrame if it has more than a single column, but I think this is beyond the scope of this PR Thx @Ormorod 