Skip to content

Commit 3614159

Browse files
committed
BUG:Cannot calculate quantiles from Int64Dtype Series when results are floats
1 parent 08d296f commit 3614159

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/array_algos/quantile.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -181,5 +181,8 @@ def _quantile_ea_fallback(
181181
assert res.ndim == 2
182182
assert res.shape[0] == 1
183183
res = res[0]
184-
out = type(values)._from_sequence(res, dtype=values.dtype)
184+
try:
185+
out = type(values)._from_sequence(res, dtype=values.dtype)
186+
except TypeError:
187+
out = np.atleast_2d(np.asarray(res))
185188
return out

0 commit comments

Comments
 (0)