pyjanitor icon indicating copy to clipboard operation
pyjanitor copied to clipboard

[ENH] explicit default parameter for case_when

Open samukweku opened this issue 2 years ago • 3 comments

PR Description

Please describe the changes proposed in the pull request:

~~- standalone function (if_else) that can be imported for use in pandas.assign~~

  • explicit default parameter added

This PR resolves #1159 .

PR Checklist

Please ensure that you have done the following:

  1. [x] PR in from a fork off your branch. Do not PR from <your_username>:dev, but rather from <your_username>:<feature-branch_name>.
  1. [x] If you're not on the contributors list, add yourself to AUTHORS.md.
  1. [ ] Add a line to CHANGELOG.md under the latest version header (i.e. the one that is "on deck") describing the contribution.
    • Do use some discretion here; if there are multiple PRs that are related, keep them in a single line.

Automatic checks

There will be automatic checks run on the PR. These include:

  • Building a preview of the docs on Netlify
  • Automatically linting the code
  • Making sure the code is documented
  • Making sure that all tests are passed
  • Making sure that code coverage doesn't go down.

Relevant Reviewers

Please tag maintainers to review.

  • @ericmjl

samukweku avatar Sep 08 '22 11:09 samukweku

🚀 Deployed on https://deploy-preview-1165--pyjanitor.netlify.app

ericmjl avatar Sep 08 '22 11:09 ericmjl

Codecov Report

Merging #1165 (dc12acc) into dev (4eaef97) will decrease coverage by 0.00%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #1165      +/-   ##
==========================================
- Coverage   97.96%   97.96%   -0.01%     
==========================================
  Files          76       76              
  Lines        3395     3387       -8     
==========================================
- Hits         3326     3318       -8     
  Misses         69       69              

codecov[bot] avatar Sep 08 '22 11:09 codecov[bot]

Two threads (https://github.com/pyjanitor-devs/pyjanitor/runs/8295244245, https://github.com/pyjanitor-devs/pyjanitor/runs/8295231459) CI failed due to new PR #1158.

case_when testcases raised some errors like

=========================== short test summary info ============================
ERROR tests/functions/test_case_when.py - hypothesis.errors.InvalidArgument: ...
ERROR tests/functions/test_case_when.py - hypothesis.errors.InvalidArgument: ...
ERROR tests/functions/test_case_when.py - hypothesis.errors.InvalidArgument: ...
ERROR tests/functions/test_case_when.py - hypothesis.errors.InvalidArgument: ...

Zeroto521 avatar Sep 12 '22 01:09 Zeroto521

@thatlittleboy would you like to do the honors here? a -0.01% decrease in coverage is marginal, we can handle it :smile:

ericmjl avatar Oct 10 '22 21:10 ericmjl

yep okies, merging

thatlittleboy avatar Oct 11 '22 15:10 thatlittleboy