ee.Dictionary.keys

以清單形式擷取字典的鍵。金鑰會依自然順序排序。

用量傳回
Dictionary.keys()清單
引數類型詳細資料
這個: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 list of dictionary keys', dict.keys());

Python 設定

請參閱 Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

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