-
Notifications
You must be signed in to change notification settings - Fork 55
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
cols([:x1, :x2])
should be a vector vectors, not a DataFrame
#158
Comments
The documentation says:
which means that There is another question what should
and your second example should rather be |
Here is the scenario. You are writing code in global scope and where you have to take the sum across columns.
Now you realize that you aren't always working with With the current behavior, you can't just do a one-to-one translation but just adding
This is frustrating. It means to get a one-to-one translation from the global scope code to the function code, I need to add an I think that whatever container of This is roughly how stata works. Stata is very lisp-like. If you define the local
wherever you see that local
in the code, you know that it will always behave exactly as though the literal cc @matthieugomez for the stata analogy |
I understand the issue with convenience. The problem is with consistency. Consider the code:
(this is how it works now) How would you want to express this under your proposal? Or such things should be not supported? |
It would not be supported. Since you can't do that with I think the main problem is that it would be very very hard to specialize behavior based off of what's inside the
I don't really see a way of getting this to work without a whole extra If we had to force a certain behavior on the user, I personally would rather have |
For example, here's something that might be feasible
|
In this case I would list a list of values accepted in |
Yes, i think this is easiest. I think my idea of evaluating Actually, I just tried it out with my new DataFrames.transform-based macro It "just works" exactly as I described above, with the exception that
isn't supported. I will continue to thing on this. |
Marking as 1.X since as fas as I understand, Allowing for |
|
Closed in favor of #229 |
The calls
Should return the same thing. However the second one throws an error because things inside
cols
becomedf[!, [:x1, :x2]]
.I think this makes the mental model for
cols
more complicated than it needs to be, and isn't documented behavior. This makes me think I should add it to the "limits of" sections of tests in #155. The question is, should this be defined as undefined behavior?cc @mkborregaard and @tk3369 and other regular users, I want to get feedback from people using DataFramesMeta on this.
The text was updated successfully, but these errors were encountered: