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

feat: Add support for .shift(n).over('col') for pandas-like DataFrames #1627

Conversation

ClaudioSalvatoreArcidiacono
Copy link
Contributor

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

See #1609

@ClaudioSalvatoreArcidiacono ClaudioSalvatoreArcidiacono changed the title First draft feat: Add support for .shift(n).over('col') for pandas-like DataFrames Dec 20, 2024
@MarcoGorelli
Copy link
Member

nice, thanks @ClaudioSalvatoreArcidiacono !

I think @FBruzzesi 's work in #1614 might make this easier, perhaps we should wait to get that in, then we can update here?

@FBruzzesi
Copy link
Member

Thanks @ClaudioSalvatoreArcidiacono !

I was about to echo what @MarcoGorelli just mentioned! Instead of an ad-hoc change, I think waiting for #1614 would make it easier. Possibly it will be ready by end of today.

@ClaudioSalvatoreArcidiacono
Copy link
Contributor Author

Definetly! Nice PR @FBruzzesi

@MarcoGorelli
Copy link
Member

that PR's merged, if you fancy updating @ClaudioSalvatoreArcidiacono I think we'd love to get this in!

@FBruzzesi
Copy link
Member

that PR's merged, if you fancy updating @ClaudioSalvatoreArcidiacono I think we'd love to get this in!

Just a headsup that the PR was shipped with a bug, namely it does not track kwargs in expr composition. You would probably want to wait for #1645 which contains a fix

Copy link
Member

@FBruzzesi FBruzzesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty happy with this! I left only a tiny comment before merging!

narwhals/_pandas_like/expr.py Outdated Show resolved Hide resolved
Accept comment

Co-authored-by: Francesco Bruzzesi <[email protected]>
Copy link
Member

@FBruzzesi FBruzzesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton @ClaudioSalvatoreArcidiacono πŸ‘Œ

DogsHighFiveGIF

@FBruzzesi FBruzzesi merged commit ecde246 into narwhals-dev:main Dec 26, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enh: support nw.col('a').shift(n).over('b')
3 participants