ee.Dictionary.size

تعداد مدخل های یک فرهنگ لغت را برمی گرداند.

استفاده برمی گرداند
Dictionary. size () عدد صحیح
استدلال تایپ کنید جزئیات
این: dictionary فرهنگ لغت

نمونه ها

ویرایشگر کد (جاوا اسکریپت)

// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
  B1: 182,
  B2: 219,
  B3: 443
});

print('The number of dictionary entries', dict.size());

راه اندازی پایتون

برای اطلاعات در مورد API پایتون و استفاده از geemap برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.

import ee
import geemap.core as geemap

کولب (پایتون)

# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
    'B1': 182,
    'B2': 219,
    'B3': 443
})

print('The number of dictionary entries:', dic.size().getInfo())