-
Notifications
You must be signed in to change notification settings - Fork 143
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
Could the CSV.write argument order be interchanged ? #819
Comments
This is already supported? i.e. we have the definition |
Thanks for your response Jacob. I'm still no clear though sorry.
That is, put the DataFrame before the file name, so that it can be omitted within a @chain block. Is this possible? I couldn't ascertain that from your response. |
Yeah, I'm saying you can just do: @chain CSV.read( inputFile ) begin
stack([:Curve,:Tenor] |> Not)
@where( :value .!= 0 )
insertcols!(_, ([:Curve2,:Tenor2] .=> split.( _.variable, '/' ) |> invert )...)
groupby( [:Curve,:Curve2] )
combine( :value => sum => :sumval )
CSV.write( outputFile)
end |
Here is a simpler example:
Removing the ,_ gives the error:
|
Ah, I see. Chain.jl is doing their own transformation to the |
For most DataFrame functions, the DataFrame is the first argument.
This is useful when working with @chain that fills in the first argument as the previous line's output.
If the CSV argument order were swapped. the final line below would be just CSV.write( outputFile )
(The underscore could be omitted)
The text was updated successfully, but these errors were encountered: