You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, `renamecols=false` just prevents the function name from being appended to the final column name such that the operation is *usually* returned to the same column.
2286
+
Actually, `renamecols=false` just prevents the function name from being appended
2287
+
to the final column name such that the operation is *usually* returned to the same column.
2283
2288
2284
2289
```julia
2285
2290
julia>transform(df, [:a, :b] =>+) # new column name is all source columns and function name
@@ -2939,13 +2944,18 @@ julia> select(
2939
2944
2940
2945
!!! note "Notes"
2941
2946
2942
-
* `Not("Time")` or `2:4` would have been equally good choices for `source_column_selector` in the above operations.
2943
-
* Don't forget `ByRow` if your function is to be applied to elements rather than entire column vectors.
2944
-
Without `ByRow`, the manipulations above would have thrown
2945
-
`ERROR: MethodError: no method matching +(::Vector{Int64}, ::Int64)`.
2947
+
* `Not("Time")` or `2:4` would have been equally good choices
2948
+
for `source_column_selector` in the above operations.
2949
+
2950
+
* Don't forget `ByRow` if your function is to be applied to elements
2951
+
rather than entire column vectors.
2952
+
Without `ByRow`, the manipulations above would have thrown
2953
+
`ERROR: MethodError: no method matching +(::Vector{Int64}, ::Int64)`.
2954
+
2946
2955
* Regular expression (`r""`) and `:` `source_column_selectors`
2947
-
must be wrapped in `Cols` to be properly broadcasted
2948
-
because otherwise the broadcasting occurs before the expression is expanded into a vector of matches.
2956
+
must be wrapped in `Cols` to be properly broadcasted
2957
+
because otherwise the broadcasting occurs before the expression
2958
+
is expanded into a vector of matches.
2949
2959
2950
2960
You could also broadcast different columns to different functions
2951
2961
by supplying a vector of functions.
@@ -3095,7 +3105,8 @@ julia> df # see that the previous expression updated the data frame `df`
3095
3105
3 │ 369
3096
3106
```
3097
3107
3098
-
Recall that the return type from a data frame manipulation function call is always a data frame.
3108
+
Recall that the return type from a data frame manipulation function call
3109
+
is always a data frame.
3099
3110
The return type of a data frame column accessed with dot syntax is a `Vector`.
3100
3111
Thus the expression `df.x + df.y` gets the column data as vectors
0 commit comments