BUG: inconsistencies/errors in quantile on empty DataFrame #14564
Labels
API - Consistency
Internal Consistency of API/Behavior
good first issue
Needs Tests
Unit test(s) needed to prevent regressions
quantile
quantile method
In PR #14536, I added some tests in comments, as they currently fail or give inconsistent results:
1. Empty frame with float dtype:
In 0.18.1, this gives NaNs or empty frame depending on the axis (which is correct I think):
But on master, the
axis=1
case errors (df.quantile(0.5) also gives NaNs):master:
2. Empty frame with int dtype
Opposed to float dtype giving a series of NaNs, with integers it gives an empty frame in 0.18.1:
and on master also raises the ValueError as for float with
axis=1
:3. Empty frame with datetime values
On 0.18.1 / master, it gives a series of NaNs, where this should be NaTs:
4. Frame with only only datetime columns but without
only_numeric=False
On 0.18.1, this gives an empty frame
while on master this raises the same ValueError as above:
The text was updated successfully, but these errors were encountered: