ee.List.cat

ต่อเนื้อหาของรายการอื่นเข้ากับรายการ

การใช้งานการคืนสินค้า
List.cat(other)รายการ
อาร์กิวเมนต์ประเภทรายละเอียด
ดังนี้ listรายการ
otherรายการ

ตัวอย่าง

โปรแกรมแก้ไขโค้ด (JavaScript)

print(ee.List(['dog']).cat(['squirrel']));  // ["dog","squirrel"]
print(ee.List(['moose']).cat(['&', 'squirrel']));  // ["moose","&","squirrel"]

print(ee.List([['a', 'b']]).cat(ee.List([['1', 1]])));  // [["a","b"],["1",1]]

print(ee.List([]).cat(ee.List([])));  // []
print(ee.List([1]).cat(ee.List([])));  // [1]
print(ee.List([]).cat(ee.List([2])));  // [2]

การตั้งค่า Python

ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

import ee
import geemap.core as geemap

Colab (Python)

print(ee.List(['dog']).cat(['squirrel']).getInfo())  # ['dog', 'squirrel']

# ['moose', '&', 'squirrel']
print(ee.List(['moose']).cat(['&', 'squirrel']).getInfo())

# [['a', 'b'], ['1', 1]]
print(ee.List([['a', 'b']]).cat(ee.List([['1', 1]])).getInfo())

print(ee.List([]).cat(ee.List([])).getInfo())  # []
print(ee.List([1]).cat(ee.List([])).getInfo())  # [1]
print(ee.List([]).cat(ee.List([2])).getInfo())  # [2]