ee.Reducer.group
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
کاهنده گروه ها را با مقدار یک ورودی داده شده ثبت می کند و هر گروه را با کاهنده داده شده کاهش می دهد.
استفاده | برمی گرداند | Reducer. group ( groupField , groupName ) | کاهنده |
استدلال | تایپ کنید | جزئیات | این: reducer | کاهنده | کاهش دهنده برای اعمال به هر گروه، بدون فیلد گروه. |
groupField | عدد صحیح، پیش فرض: 0 | فیلدی که شامل گروه های رکورد است. |
groupName | رشته، پیش فرض: "گروه" | کلید فرهنگ لغت که شامل گروه است. پیشفرضها به «گروهبندی». |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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'. |"]]