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

Add rowwise function #1459

Closed
wants to merge 1 commit into from
Closed

Conversation

pdeffebach
Copy link
Contributor

Iterates through all rows in a dataframe and makes an array of length nrow(df).

@pdeffebach
Copy link
Contributor Author

usage is t = rowwise(mean, df)

If you approve the concept, I will explore performance more deeply. mapslices(f, x, 2) is super fast, but i'm not sure how to get close to that performance with dataframes, which was is better optimized for column operations.

@nalimilan
Copy link
Member

Now that iteration over DataFrameRow yields values, this can be written as [mean(r) for r in eachrow(df)], so I don't think we need this. We could also get rid of colwise. See #1595.

@pdeffebach pdeffebach closed this Dec 26, 2018
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.

2 participants