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

@eachrow over a range? #316

Open
ghost opened this issue Dec 15, 2021 · 1 comment
Open

@eachrow over a range? #316

ghost opened this issue Dec 15, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 15, 2021

If I do this:

@eachrow df[start:stop, :] ...

It works but the row index always starts from one.
Also @eachrow! doesn't operate on the same df since the indexing copies, and using a view gives error:

dfv = @view df[start:stop, :]
@eachrow! dfv ...
# ERROR: MethodError: no method matching transform!(::SubDataFrame{DataFrame, DataFrames.Index, UnitRange{Int64}})
@pdeffebach
Copy link
Collaborator

Can you try that second example on the latest version of DataFrames? 1.3.

I agree there could be some interesting design possibilities here. Check on 1.3 to see where we can start from.

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

No branches or pull requests

1 participant