DOC: Added note about groupby excluding Decimal columns by default
State: closed

Also included example of how to explicitly aggregate by Decimal columns.

- closes #13821


Labels:
name: Docs
name: Groupby
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18953?src=pr&el=h1) Report
> Merging [#18953](https://codecov.io/gh/pandas-dev/pandas/pull/18953?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c8ce3d01e9ffafc24c6f9dd568cd9eb7e42c610c?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/18953/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/18953?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #18953   +/-   ##
=======================================
  Coverage    92.2%    92.2%           
=======================================
  Files         169      169           
  Lines       50924    50924           
=======================================
  Hits        46952    46952           
  Misses       3972     3972
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <ø> (ø)` | :arrow_up: |
| #single | `42.3% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18953?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18953?src=pr&el=footer). Last update [c8ce3d0...c755f2c](https://codecov.io/gh/pandas-dev/pandas/pull/18953?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

I'm not so sure Pandas should mention ``Decimal`` on the ``groupby`` page.

Operations on ``Decimal``s will by nature be slow, and people could misunderstand the slowness as a slowness of Pandas. IMO Pandas should promote using the various numpy and pandas types and python ``str``, very seldomly other types.

Maybe it could go to the FAQ or maybe just to StackOverflow? If it goes in the pandas docs, there should IMO be a visible disclaimer regarding slowness and the backsides of doing math operations on python objects  rather than numpy objects.
Made requested changes.
Fix for issue #17027.
can you rebase this
closing as stale
@jreback Can certainly rebase. 🙂 
@gfyoung i am not sure this is in the right direction
needs significant edits
> i am not sure this is in the right direction

Hmm...I see.  I was under the impression, given the conversation, that this just needed rebasing.  What do you mean by the "right direction" ?
needs to be way way simpler
my point is i would start over
I can revisit this.
Hello not interseted to learn

Sent from Outlook<http://aka.ms/weboutlook>
Thank you very much for replying
Jean K
________________________________
From: Jeff Reback <notifications@github.com>
Sent: Tuesday, June 26, 2018 1:37 PM
To: pandas-dev/pandas
Cc: Subscribed
Subject: Re: [pandas-dev/pandas] Added note about groupby excluding Decimal columns by default (#18953)


closing as stale

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://github.com/pandas-dev/pandas/pull/18953#issuecomment-400262069>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Aj_QpqG49taqbGUDB8-RaAbV8T-3rJbhks5uAg7rgaJpZM4RNSQx>.

@jorisvandenbossche Will do.
@jorisvandenbossche & @jreback Requested changes made.
you need to merge master and force push, you are picking up all commits since july.
Fixed
@jreback is this ready to be merged after the last chages?
so I am not averse to expanding this section, however decimals DO now work on master if they are typed as EAs. So maybe a reference to that possibility here.
@pdpark do you have time to update based on the last comment?
> however decimals DO now work on master if they are typed as EAs

The decimals EA is not publicly exposed, only for testing purposes for now.
I updated this PR (slight rewording + simplified and fixed the example a little bit), should be ready to merge now.
> Some lines are >80, but I think in rst files we don't care

We care a little bit, to the extent that it fits in the code block box without generating scroll bars, but I think the limit is a bit higher than 80 for that.

Merging since it is a `/pandas/doc/source` change only (the CI is still an old version that is failing)
@pdpark Thanks a lot for the PR!