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

Support subdataframes #76

Open
piever opened this issue Apr 20, 2018 · 1 comment
Open

Support subdataframes #76

piever opened this issue Apr 20, 2018 · 1 comment

Comments

@piever
Copy link
Contributor

piever commented Apr 20, 2018

Currently SubDataFrames are not iterable tables, which is unfortunate as it's actually surprisingly clumsy to convert them to DataFrames. The current method to iterate on DataFrames could probably have a weaker signature and maybe that'd be enough to have it work on any AbstractDataFrame. The main application would be to be able to use it in a by call, see this discourse post

julia> using IterableTables

julia> df = DataFrame(x = rand(10));

julia> by(TableTraits.isiterabletable, df, :x)
10×2 DataFrames.DataFrame
│ Row │ x        │ x1    │
├─────┼──────────┼───────┤
│ 10.67292false │
│ 20.921996false │
│ 30.517816false │
│ 40.822496false │
│ 50.120007false │
│ 60.289319false │
│ 70.113851false │
│ 80.826421false │
│ 90.881944false │
│ 100.279972false
@davidanthoff
Copy link
Member

This might already work with the new code in DataFrames.jl, and if it doesn't, it would have to be supported there.

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

2 participants