@@ -837,8 +837,8 @@ julia> combine(df, All() .=> [sum prod]) # the same using 2-dimensional broadcas
837
837
If you would prefer the result to have the same number of rows as the source
838
838
data frame, use ` select ` instead of ` combine ` .
839
839
840
- In the remainder of this section we will discuss some of the more advanced topis
841
- related to operation specification syntax, so you may decide to skip them if you
840
+ In the remainder of this section we will discuss more advanced topics related
841
+ to the operation specification syntax, so you may decide to skip them if you
842
842
want to focus on the most common usage patterns.
843
843
844
844
A ` DataFrame ` can store values of any type as its columns, for example
@@ -855,7 +855,7 @@ julia> df2 = combine(df, All() .=> extrema)
855
855
856
856
Later you might want to expand the tuples into separate columns storing the computed
857
857
minima and maxima. This can be achieved by passing multiple columns for the output.
858
- Here is an example how this can be done by writing the column names by-hand for a single
858
+ Here is an example of how this can be done by writing the column names by-hand for a single
859
859
input column:
860
860
861
861
```
@@ -880,7 +880,7 @@ julia> combine(df2, All() .=> identity .=> [["A_min", "A_max"], ["B_min", "B_max
880
880
881
881
This approach works, but can be improved. Instead of writing all the column names
882
882
manually we can instead use a function as a way to specify target column names
883
- conditional on source column names:
883
+ based on source column names:
884
884
885
885
```
886
886
julia> combine(df2, All() .=> identity .=> c -> first(c) .* ["_min", "_max"])
@@ -909,7 +909,7 @@ julia> combine(df, All() .=> Ref∘extrema .=> c -> c .* ["_min", "_max"])
909
909
910
910
Note that in this case we needed to add a ` Ref ` call in the ` Ref∘extrema ` operation specification.
911
911
Without ` Ref ` , ` combine ` iterates the contents of the value returned by the operation specification function,
912
- which in our case is a tuple of numbers, and tries to expand it assuming that each produced value specifies one row,
912
+ which in our case is a tuple of numbers, and tries to expand it assuming that each produced value represents one row,
913
913
so one gets an error:
914
914
915
915
```
0 commit comments