File tree 3 files changed +6
-2
lines changed
3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ Bug Fixes
219
219
wrong data types and missing values (:issue: `6335 `)
220
220
- Inconsistent types in Timestamp addition/subtraction (:issue: `6543 `)
221
221
- Bug in indexing: empty list lookup caused ``IndexError `` exceptions (:issue: `6536 `, :issue: `6551 `)
222
-
222
+ - Series.quantile raising on an `` object `` dtype ( :issue: ` 6555 `)
223
223
224
224
pandas 0.13.1
225
225
-------------
Original file line number Diff line number Diff line change @@ -1287,7 +1287,7 @@ def quantile(self, q=0.5):
1287
1287
if len (valid_values ) == 0 :
1288
1288
return pa .NA
1289
1289
result = _quantile (valid_values , q * 100 )
1290
- if result . dtype == _TD_DTYPE :
1290
+ if not np . isscalar and com . is_timedelta64_dtype ( result ) :
1291
1291
from pandas .tseries .timedeltas import to_timedelta
1292
1292
return to_timedelta (result )
1293
1293
Original file line number Diff line number Diff line change @@ -2102,6 +2102,10 @@ def test_quantile(self):
2102
2102
q = self .ts .quantile (0.9 )
2103
2103
self .assertEqual (q , scoreatpercentile (self .ts .valid (), 90 ))
2104
2104
2105
+ # object dtype
2106
+ q = Series (self .ts ,dtype = object ).quantile (0.9 )
2107
+ self .assertEqual (q , scoreatpercentile (self .ts .valid (), 90 ))
2108
+
2105
2109
def test_describe (self ):
2106
2110
_ = self .series .describe ()
2107
2111
_ = self .ts .describe ()
You can’t perform that action at this time.
0 commit comments