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
Filters inside Filter are combined as OR operations, alternatively we can use `df.FilterAggragation` with `dataframe.Or`.
@@ -199,7 +198,7 @@ If we want to combine filters with AND operations, we can use `df.FilterAggregat
199
198
200
199
```go
201
200
fil:= df.FilterAggregation(
202
-
dataframe.And,
201
+
dataframe.And,
203
202
dataframe.F{"A", series.Eq, "a"},
204
203
dataframe.F{"D", series.Eq, true},
205
204
)
@@ -219,14 +218,15 @@ fil2 := fil.Filter(
219
218
)
220
219
```
221
220
222
-
Filtering is based on predefined comparison operators:
223
-
*`series.Eq`
224
-
*`series.Neq`
225
-
*`series.Greater`
226
-
*`series.GreaterEq`
227
-
*`series.Less`
228
-
*`series.LessEq`
229
-
*`series.In`
221
+
Filtering is based on predefined comparison operators:
222
+
223
+
-`series.Eq`
224
+
-`series.Neq`
225
+
-`series.Greater`
226
+
-`series.GreaterEq`
227
+
-`series.Less`
228
+
-`series.LessEq`
229
+
-`series.In`
230
230
231
231
However, if these filter operations are not sufficient, we can use user-defined comparators.
232
232
We use `series.CompFunc` and a user-defined function with the signature `func(series.Element) bool` to provide user-defined filters to `df.Filter` and `df.FilterAggregation`.
@@ -255,7 +255,7 @@ This example filters rows based on whether they have a cell value starting with
255
255
GroupBy && Aggregation
256
256
257
257
```go
258
-
groups:= df.GroupBy("key1", "key2") // Group by column "key1", and column "key2"
258
+
groups:= df.GroupBy("key1", "key2") // Group by column "key1", and column "key2"
259
259
aggre:= groups.Aggregation([]AggregationType{Aggregation_MAX, Aggregation_MIN}, []string{"values", "values2"}) // Maximum value in column "values", Minimum value in column "values2"
260
260
```
261
261
@@ -359,7 +359,7 @@ if a.Err != nil {
359
359
fmt.Println(flights)
360
360
361
361
> [336776x20] DataFrame
362
-
>
362
+
>
363
363
> X0 year month day dep_time sched_dep_time dep_delay arr_time ...
0 commit comments