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

feature request: shift #3388

Open
adienes opened this issue Oct 16, 2023 · 2 comments
Open

feature request: shift #3388

adienes opened this issue Oct 16, 2023 · 2 comments

Comments

@adienes
Copy link
Contributor

adienes commented Oct 16, 2023

I know there is ShiftedArrays.jl , but (and not to sound needy) I think that adding a new package dependency, typing out the 12-character ShiftedArray instead of just shift, and then having to deal with a new wrapper type e.g. ShiftedVector{Float64, Missing, Vector{Float64}} instead of Vector{Union{Missing, Float64}} is too much overhead for a pretty fundamental shift operation

@adienes
Copy link
Contributor Author

adienes commented Oct 16, 2023

I just realized there is the lag function. this mitigates the issue of the number of characters somewhat, but the other two annoyances stand

maybe DataFrames can "re"-export this function? I put "re" in scare quotes as it seems ShiftedArrays itself does not export this

@bkamins bkamins added this to the 1.7 milestone Oct 16, 2023
@bkamins
Copy link
Member

bkamins commented Oct 16, 2023

@nalimilan - what do you think?

We have been trying to avoid adding such functionalities to DataFrames.jl in the past, but indeed for newcomers discovering that you need to write:

import ShiftedArrays: lag

and then that they get a view, not a copy, is hard to grasp (I know this from my teaching experience).

@bkamins bkamins modified the milestones: 1.7, 1.x Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants