BUG: read_hdf bad filtering in case of categorical string columns
- [x] closes #39189
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry


This bug happens when filtering on categorical string columns and  choose a value which doesn't exist in the column.
Instead of returning an empty dataframe, we get some records. 
It happens because of the usage in numpy `searchsorted(v, side="left")` that find indices where elements should be inserted to maintain order (and not 0 in case that the value doesn't exist), like was assumed in the code.

I changed it to first the for the value, and use `searchsorted` only if value exists, I also added a test for this specific use case.
I think in the long run, maybe we should refactor this area in the code since one function covers multiple use cases which makes it more complex to test.
yes, ofc.
I used unittest to write it and then understood that I'm not allowed to use it, so i need to convert my tests to monkeypatch pytest. Hello @nofarm3! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2021-01-26 19:36:42 UTC