Skip to content

Commit

Permalink
BUG: catch Exception instead of TypeError in multi-groupby code, surf…
Browse files Browse the repository at this point in the history
…aced due to # of args in DataFrame.mean changing in PR #313
  • Loading branch information
wesm committed Nov 2, 2011
1 parent e775d09 commit 36851c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions RELEASE.rst
Expand Up @@ -30,6 +30,10 @@ pandas 0.5.1
**New features / modules**

- Add `melt` function to `pandas.core.reshape`
- Add `level` parameter to group by level in Series and DataFrame
descriptive statistics (PR #313)
- Add `head` and `tail` methods to Series, analogous to to DataFrame (PR
#296)

**Improvements to existing features**

Expand All @@ -46,6 +50,8 @@ Thanks
------

- Kieran O'Mahony
- Jeff Hammerbacher
- Adam Klein

pandas 0.5.0
============
Expand Down
4 changes: 3 additions & 1 deletion pandas/core/groupby.py
Expand Up @@ -388,7 +388,9 @@ def _doit(reschunk, ctchunk, gen, shape_axis=0):
mask = counts.ravel() > 0
output = output.reshape((np.prod(group_shape),) + stride_shape)
output = output[mask]
except TypeError:
except Exception:
# we failed, try to go slice-by-slice / column-by-column

result = np.empty(group_shape, dtype=float)
result.fill(np.nan)
# iterate through "columns" ex exclusions to populate output dict
Expand Down

0 comments on commit 36851c7

Please sign in to comment.