ee.Reducer.group
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
werden Datensätze nach dem Wert einer bestimmten Eingabe gruppiert und jede Gruppe wird mit dem angegebenen Reduzierer reduziert.
Nutzung | Ausgabe |
---|
Reducer.group(groupField, groupName) | Reducer |
Argument | Typ | Details |
---|
So gehts: reducer | Reducer | Der Reduzierer, der auf jede Gruppe angewendet werden soll, ohne das Gruppenfeld. |
groupField | Ganzzahl, Standardwert: 0 | Das Feld, das Datensatzgruppen enthält. |
groupName | String, Standard: „group“ | Der Wörterbuchschlüssel, der die Gruppe enthält. Die Standardeinstellung ist „group“. |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003eGroups records based on a specified field, creating separate groups for each unique value in that field.\u003c/p\u003e\n"],["\u003cp\u003eApplies a given reducer function to each group of records, effectively reducing each group to a single result.\u003c/p\u003e\n"],["\u003cp\u003eAssigns the original reducer to process individual records within each group, excluding the grouping field itself.\u003c/p\u003e\n"],["\u003cp\u003eOrganizes the grouped data within a dictionary-like structure, using 'group' as the default key to access the grouped records.\u003c/p\u003e\n"]]],["The `Reducer.group` function groups records based on a specified `groupField` (defaulting to field 0). It then applies a provided `reducer` to each group, excluding the grouping field. The result of the reducer on each group is stored under a `groupName` key (defaulting to \"group\"). The function itself returns a `Reducer` object. The `groupField` type can be an Integer.\n"],null,["# ee.Reducer.group\n\nGroups reducer records by the value of a given input and reduces each group with the given reducer.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------|---------|\n| Reducer.group`(`*groupField* `, `*groupName*`)` | Reducer |\n\n| Argument | Type | Details |\n|-----------------|--------------------------|------------------------------------------------------------------|\n| this: `reducer` | Reducer | The reducer to apply to each group, without the group field. |\n| `groupField` | Integer, default: 0 | The field that contains record groups. |\n| `groupName` | String, default: \"group\" | The dictionary key that contains the group. Defaults to 'group'. |"]]