A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/6555 below:

Series.quantile() should convert input dtype to float · Issue #6555 · pandas-dev/pandas · GitHub

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'

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4