Series.quantile() should convert input dtype to float (original) (raw)

Would love it if Series.quantile() converted the dtype to float (as DataFrame.quantile() appears to do). As it is, I get the following error with dtype=object:

In [8]: low
Out[8]: 
...
Name: p, Length: 2218, dtype: object

In [9]: low.quantile(0.33)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/ase/src/ase/analysis/conservation.py in <module>()
----> 1 low.quantile(0.33)

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/series.pyc in quantile(self, q)
   1323             return pa.NA
   1324         result = _quantile(valid_values, q * 100)
-> 1325         if result.dtype == _TD_DTYPE:
   1326             from pandas.tseries.timedeltas import to_timedelta
   1327             return to_timedelta(result)

AttributeError: 'float' object has no attribute 'dtype'