ee.Dictionary.size

사전의 항목 수를 반환합니다.

사용반환 값
Dictionary.size()정수
인수유형세부정보
다음과 같은 경우: dictionary딕셔너리

코드 편집기 (JavaScript)

// 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());

Python 설정

Python API 및 geemap를 사용한 대화형 개발에 관한 자세한 내용은 Python 환경 페이지를 참고하세요.

import ee
import geemap.core as geemap

Colab (Python)

# 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())