ee.Dictionary.fromLists

キーと値の 2 つの並列リストからディクショナリを作成します。

用途戻り値
ee.Dictionary.fromLists(keys, values)Dictionary
引数タイプ詳細
keysリストキーのリスト。
valuesリスト値のリスト。

コードエディタ(JavaScript)

// Corresponding lists of keys and values.
var keys = ['B1', 'B2', 'B3'];
var values = [182, 219, 443];
print('Dictionary from lists of keys and values',
      ee.Dictionary.fromLists(keys, values));

Python の設定

Python API とインタラクティブな開発での geemap の使用については、 Python 環境のページをご覧ください。

import ee
import geemap.core as geemap

Colab(Python)

# Corresponding lists of keys and values.
keys = ['B1', 'B2', 'B3']
values = [182, 219, 443]
print('Dictionary from lists of keys and values:',
      ee.Dictionary.fromLists(keys, values).getInfo())