New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groupby rank top #1349

Merged
merged 4 commits into from Jul 26, 2016

Conversation

Projects
None yet
3 participants
@ssanderson
Member

ssanderson commented Jul 26, 2016

Adds support for groupby to top, bottom, and rank. Based on @andportnoy's work in #1260, with a few small fixes for datetime dtypes and some more test coverage.

@ssanderson ssanderson added the Pipeline label Jul 26, 2016

@ssanderson ssanderson force-pushed the groupby-rank-top branch from 1a32f60 to 1e062ac Jul 26, 2016

ssanderson added some commits Jul 26, 2016

ENH: Finish adding groupby to rank/top/bottom.
- Added test coverage for grouped and masked top/bottom.

- Added test coverage for grouped rank on datetime factors.

- Fixed an issue where grouped rank would fail on datetime inputs
  because unary-negative isn't defined for datetimes.  We now instead
  directly invoke a function from rank.pyx that does the normalizations
  as neeeded.

- Fixed an issue where GroupedRowTransform assumed that it produced the
  same dtype as its input.  This isn't true for rank() of a
  datetime-dtype factor.  GroupedRowTransform now takes a required dtype
  parameter.

- Similarly, fixed an issue where GroupedRowTransform assumed that its
  missing_value was the same as its parent's, which isn't true for
  rank() of a datetime-dtype factor.  GroupedRowTransform now takes a
  required dtype parameter.

- Fixed an issue where Factor.demean() and Factor.zscore() weren't
  properly cached because their static_identity included a closure that
  was dynamically generated on each invocation.  They both now always
  use a function defined at module scope.

@ssanderson ssanderson force-pushed the groupby-rank-top branch from 1e062ac to a935943 Jul 26, 2016

@coveralls

This comment has been minimized.

coveralls commented Jul 26, 2016

Coverage Status

Coverage increased (+0.005%) to 85.159% when pulling a935943 on groupby-rank-top into 1619228 on master.

@ssanderson ssanderson merged commit 4be07e4 into master Jul 26, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ssanderson ssanderson deleted the groupby-rank-top branch Jul 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment