The Value Error saying that empty data was passed with indices specif…
…ied is now only raised when that is indeed the case.

The following example incorrectly triggers the ValueError saying that "Empty data passed with indices specified."

`pd.DataFrame(np.zeros((0, 2)), columns=['a', 'b', 'c'])`

- [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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Hey, thank you for your quick response.
1. The function still raises a ValueError, but no longer with an incorrect message. I am not sure if this needs to be tested.
2. I am not comparing an integer with a boolean. I am doing chained comparison. a == b < c gets expanded to a == b and b < c. > I am not sure if this needs to be tested.

yup, definitely

>  I am doing chained comparison

ah I see, thanks Nice, thanks! Can you add a whatsnew note to `2.1.0.rst` too please? Thanks @Xargonus 