-
Notifications
You must be signed in to change notification settings - Fork 173
[ENH] Fix summarise
for MultiIndex
#1460
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
Conversation
🚀 Deployed on https://deploy-preview-1460--pyjanitor.netlify.app |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1460 +/- ##
==========================================
+ Coverage 83.49% 92.43% +8.94%
==========================================
Files 88 90 +2
Lines 6469 6585 +116
==========================================
+ Hits 5401 6087 +686
+ Misses 1068 498 -570 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-approving!
janitor/functions/expand_grid.py
Outdated
@@ -502,7 +502,7 @@ def _compute_cartesian_product(inputs: tuple, sort: bool) -> dict: | |||
return contents | |||
|
|||
lengths = (len(key) for key in contents if isinstance(key, tuple)) | |||
lengths = max(lengths) | |||
lengths = max(lengths, default=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this change, I think we may need a test. What do you think, @samukweku?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericmjl thanks for the review ... .the default
parameter is not necessary since line 504 will only kick in if line 501 is not true.
@samukweku let's merge and release! |
* updates to jn.summarise * cleanup * cleanup * singledispatch for tuple * minor fix for mutate * remove default parameter in max * remove default parameter in max * remove default parameter in max --------- Co-authored-by: samuel.oranyeli <[email protected]> Co-authored-by: Eric Ma <[email protected]>
PR Description
Please describe the changes proposed in the pull request:
summarise
This PR resolves #1459 .
PR Checklist
Please ensure that you have done the following:
<your_username>
:dev
, but rather from<your_username>
:<feature-branch_name>
.AUTHORS.md
.CHANGELOG.md
under the latest version header (i.e. the one that is "on deck") describing the contribution.Automatic checks
There will be automatic checks run on the PR. These include:
Relevant Reviewers
Please tag maintainers to review.