Add Usage and Alternatives sections to README#421
Conversation
|
Looks good. @nalimilan - could you also please have a look? |
| subset(df, :a => ByRow(==(2))) | ||
|
|
||
| # With DataFramesMeta | ||
| @rsubset(df, :a == 2) |
There was a problem hiding this comment.
remove parentheses? So it looks cleaner.
| @rsubset(df, :a == 2) | |
| @rsubset df :a == 2 |
There was a problem hiding this comment.
I don't personally like the whitespace-dependent syntax, but your call. I am using the same examples from https://juliadata.org/DataFramesMeta.jl/dev/#Introduction which already have parentheses, so I'd change both or neither.
| transform(df, [:a, :b] => ((x, y) -> x + y) => :c) | ||
|
|
||
| # With DataFramesMeta | ||
| @transform(df, :c = :a + :b) |
There was a problem hiding this comment.
| @transform(df, :c = :a + :b) | |
| @transform df :c = :a + :b |
There was a problem hiding this comment.
Same comment as above.
| df = DataFrame(a = [1, 2], b = [3, 4]) | ||
| ``` | ||
|
|
||
| Add columns `a` and `b` together and store the result in a new column `c`. |
There was a problem hiding this comment.
| Add columns `a` and `b` together and store the result in a new column `c`. | |
| Add columns `:a` and `:b` together and store the result in a new column `:c`. |
There was a problem hiding this comment.
The column's name is a regardless of the type used to store the name. I think "a" would have similar meaning if you prefer that to `a`. But I won't fight you further if you really want to use `:a`.
| which use operation pairs to define data frame manipulations, | ||
| DataFramesMeta.jl offers macro alternatives to each manipulation function, | ||
| which convert a more readable syntax into the appropriate DataFrames.jl function calls. | ||
| This syntax simplification is demonstrated with two simple examples below. |
There was a problem hiding this comment.
Add something how its similar to R's dplyr?
There was a problem hiding this comment.
That doesn't mean anything to me, but you can include a statement like that if you wish.
I think the README could use a little more advertisement up front to demonstrate why it is good.