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

allowing assignments to variables #33

Closed
pfarndt opened this issue Aug 9, 2021 · 2 comments
Closed

allowing assignments to variables #33

pfarndt opened this issue Aug 9, 2021 · 2 comments

Comments

@pfarndt
Copy link

pfarndt commented Aug 9, 2021

It would be nice to allow assignments (intermediate or at the end) of a chain, such that code like this :

julia> using DataFramesMeta;

julia> df = DataFrame(a = [1, 2]);

julia> @chain df begin 
           @transform(y = :a)
           newdata = _
       end;

julia> newdata
ERROR: UndefVarError: newdata not defined

would work. This could also be very helpful for "debugging".

(@pdeffebach, see also here)

@jkrumbiegel
Copy link
Owner

That actually works these days, just forgot to close the issue:

julia> @chain begin
           [1, 2, 3]
           sum
           d = _
       end
6

julia> d
6

@pfarndt
Copy link
Author

pfarndt commented Feb 22, 2024

Thanks!

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