ee.Dictionary.values

Sözlüğün değerlerini liste olarak döndürür. Anahtar belirtilmezse tüm değerler, sözlüğün anahtarlarının doğal sıralamasıyla döndürülür.

Kullanımİadeler
Dictionary.values(keys)Liste
Bağımsız DeğişkenTürAyrıntılar
bu: dictionarySözlük
keysListe, varsayılan: null

Örnekler

Kod Düzenleyici (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('Values for selected keys converted to ee.List',
      dict.values(['B1', 'B2']));
print('Values for all keys converted to ee.List', dict.values());

Python kurulumu

Python API'si ve etkileşimli geliştirme için geemap kullanımı hakkında bilgi edinmek üzere Python Ortamı sayfasına bakın.

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('Values for selected keys converted to ee.List:',
      dic.values(['B1', 'B2']).getInfo())
print('Values for all keys converted to ee.List:', dic.values().getInfo())