ee.Dictionary.keys

Truy xuất các khoá của một từ điển dưới dạng danh sách. Các khoá sẽ được sắp xếp theo thứ tự tự nhiên.

Cách sử dụngGiá trị trả về
Dictionary.keys()Danh sách
Đối sốLoạiThông tin chi tiết
this: dictionaryTừ điển

Ví dụ

Trình soạn thảo mã (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 list of dictionary keys', dict.keys());

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.

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 list of dictionary keys:', dic.keys().getInfo())