Code Sample, a copy-pastable example if possible

This snippet does not work (returns an empty DataFrame)

pd.DataFrame([
    Decimal(162.7646939720129171), Decimal(162.5470404198062433),
    Decimal(162.9334883683360258), Decimal(161.7975872981700753),
    Decimal(160.9450499461786868), Decimal(163.1648865446716900),
]).quantile(0.8)

Expected Output

This snippet works as expected (returns a Series with one value)

pd.DataFrame([
    162.7646939720129171, 162.5470404198062433,
    162.9334883683360258, 161.7975872981700753,
    160.9450499461786868, 163.1648865446716900,
]).quantile(0.8)

Shouldn't both snippets work the same way?

output of pd.show_versions()

INSTALLED VERSIONS

commit: None python: 3.4.3.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-86-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8

pandas: 0.18.1 nose: None pip: 8.1.2 setuptools: 20.9.0 Cython: None numpy: 1.11.0 scipy: None statsmodels: None xarray: None IPython: 4.2.0 sphinx: None patsy: None dateutil: 2.5.2 pytz: 2016.4 blosc: None bottleneck: None tables: None numexpr: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: 0.7.2.None psycopg2: 2.6.1 (dt dec pq3 ext lo64) jinja2: 2.8 boto: None pandas_datareader: None

Comment From: TomAugspurger

I don't think this is supported. numpy.percentile doesn't even work on Decimals, so not much we can do.

Comment From: jreback

its possible (esp in the new way .quantile works), but we don't support Decimal very much.

Comment From: jreback

what we really need is Block support for Decimal. Though I don't see much actual utility for this.

closing as no action, but if you'd like to submit a PR would be ok with it.

Comment From: jorisvandenbossche

Some things do work, eg mean, also in numpy:

In [57]: a = np.array([Decimal(160.9450499461786868), Decimal(163.1648865446716900)])

In [58]: a
Out[58]:
array([Decimal('160.94504994617869897410855628550052642822265625'),
       Decimal('163.164886544671702495179488323628902435302734375')], dtype=object)

In [59]: a.mean()
Out[59]: Decimal('162.0549682454252007346440223')

So I would rather raise this issue on the numpy side, rather than starting to implement a specific Block for this