Comments (6)
Cool - this is an interesting package. I can see how this could remove friction for users.
Just a thought - for functions that are widely useful, are present in other languages standard libraries, and have an unambiguous definition for Vector
(like mapmany
and flatten
) could we first attempt to put them into Base
?
from dataapi.jl.
I think it might be possible, but I think that adding things to Julia Base has been recently restricted a lot. Also, even if we added them, they would most likely not go into the next Julia LTS, which means that we would wait several years to be sure everyone has it in Julia Base. I think the benefit of DataAPI.jl is that it allows for a much quicker development cycle as we would only add e.g.:
function flatten end
here so we do not have to promise any specific API (except for specification of a general meaning of the function).
from dataapi.jl.
Am I right that SplitApplyCombine.flatten(x)
is equivalent to collect(Iterators.flatten(x))
?
DataFrames.flatten(df, cols)
is a bit different I would say. In particular, if we consider data frames as collections of rows, SplitApplyCombine.flatten(df)
should return a (flat) collection of all cells in df
. The flatten(df, cols)
method doesn't fit very well in that approach -- though it's not incompatible either.
from dataapi.jl.
Indeed. The issue is to avoid name clashes when both DataFrames.jl and SplitApplyCombine.jl are both loaded in a session (which is relatively common for advanced usage scenarios). What would you do in such a case?
from dataapi.jl.
That sounds right.
I assumed you used flatten(gdf)
for nested (grouped) data frames?
The cols
version “feels” like to me a lot some flavour of a SpltApplyCombine.mapmany
call which is what flatten
is ultimately defined as. You are automatically keeping (broadcasting?) the columns which aren’t mentioned, right?
from dataapi.jl.
I assumed you used
flatten(gdf)
for nested (grouped) data frames?
It is just DataFrame
constructor
You are automatically keeping (broadcasting?) the columns which aren’t mentioned, right?
Right
from dataapi.jl.
Related Issues (20)
- `Between` should accept more than `Int` and `Symbol` HOT 2
- `metadata` method HOT 70
- isordered HOT 4
- Deprecate `All` HOT 9
- TagBot trigger issue HOT 20
- ellipsis notation for Beetwen HOT 4
- Plan for 1.7 release
- Add `Selector` abstract type for ecosytem compat, and rethink `Between` HOT 8
- Change describe contract HOT 2
- add kwarg to levels to keep missing
- nrow and ncol for undefined values HOT 1
- clarify Between HOT 1
- Add method for iterating metadata HOT 8
- a few concerns about metadata methods HOT 8
- Confusing `levels` fallback HOT 9
- default to metadata! style=:default HOT 6
- Define `rename` and `rename!` for modifying column names? HOT 3
- Don't define unwrap(x::Any) HOT 7
- rownumber HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataapi.jl.