Skip to content
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

[BUG] Fix deprecation warning for pivot_longer #1309

Closed
wants to merge 8 commits into from

Conversation

samukweku
Copy link
Collaborator

@samukweku samukweku commented Nov 27, 2023

PR Description

Please describe the changes proposed in the pull request:

  • Fixes deprecation warning for pivot_longer

**This PR resolves #1308 **

PR Checklist

Please ensure that you have done the following:

  1. PR in from a fork off your branch. Do not PR from <your_username>:dev, but rather from <your_username>:<feature-branch_name>.
  1. 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.

@samukweku samukweku self-assigned this Nov 27, 2023
@samukweku samukweku added the bug Something isn't working label Nov 27, 2023
@ericmjl
Copy link
Member

ericmjl commented Nov 27, 2023

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Merging #1309 (eba09fc) into dev (44152a2) will increase coverage by 0.73%.
Report is 2 commits behind head on dev.
The diff coverage is 100.00%.

❗ Current head eba09fc differs from pull request most recent head c59ed7b. Consider uploading reports for the commit c59ed7b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1309      +/-   ##
==========================================
+ Coverage   93.91%   94.64%   +0.73%     
==========================================
  Files          78       78              
  Lines        4254     4259       +5     
==========================================
+ Hits         3995     4031      +36     
+ Misses        259      228      -31     

@ericmjl
Copy link
Member

ericmjl commented Dec 13, 2023

GitBot Summary of Changes

The pull request includes several changes across two files: CHANGELOG.md and janitor/functions/pivot.py.

In CHANGELOG.md, the changes include:

  • Added the author's name (@samukweku) to the enhancement of conditional_join supporting timedelta dtype.
  • Added a bug fix for a deprecation warning in pivot_longer.

In janitor/functions/pivot.py, the changes include:

  • Updated the method to ensure uniqueness of column names in _computations_pivot_longer.
  • Refactored the _pivot_longer_dot_value function to handle multiple ".value" columns and improved memory management.
  • Updated the method of assigning column names in _pivot_longer_dot_value and _headers_single_series to use pd.MultiIndex.from_arrays.

cc: @samukweku, please check for correctness!

@ericmjl
Copy link
Member

ericmjl commented Dec 13, 2023

I think this one is good to merge as well, right @samukweku?

@samukweku
Copy link
Collaborator Author

thanks @ericmjl for the reviews

@samukweku
Copy link
Collaborator Author

closed in favour of #1321

@samukweku samukweku closed this Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprecation warning for pivot_longer
2 participants