ee.Dictionary.values

מחזירה את הערכים של מילון כרשימה. אם לא מציינים מפתחות, כל הערכים מוחזרים בסדר הטבעי של המפתחות במילון.

שימושהחזרות
Dictionary.values(keys)רשימה
ארגומנטסוגפרטים
זה: dictionaryמילון
keysרשימה, ברירת מחדל: null

דוגמאות

עורך הקוד (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

מידע על Python API ועל שימוש ב-geemap לפיתוח אינטראקטיבי מופיע בדף Python Environment.

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