ee.Dictionary.remove

সরানো নির্দিষ্ট কী সহ একটি অভিধান প্রদান করে।

ব্যবহার রিটার্নস
Dictionary. remove (selectors, ignoreMissing ) অভিধান
যুক্তি টাইপ বিস্তারিত
এই: dictionary অভিধান
selectors তালিকা মুছে ফেলার জন্য কী নামের তালিকা বা কী নামের রেগুলার এক্সপ্রেশন।
ignoreMissing বুলিয়ান, ডিফল্ট: মিথ্যা অন্তত 1 কী মেলে না এমন নির্বাচকদের উপেক্ষা করুন।

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
  B1: 182,
  B2: 219,
  B3: 443
});

print('Dictionary with selected keys removed', dict.remove(['B2', 'B3']));

print('Set ignoreMissing as true to avoid an unmatched key error',
      dict.remove({selectors: ['B2', 'B3', 'Region'], ignoreMissing: true}));

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
    'B1': 182,
    'B2': 219,
    'B3': 443
})

print('Dictionary with selected keys removed:',
      dic.remove(['B2', 'B3']).getInfo())

dic_subset = dic.remove(**{'selectors': ['B2', 'B3', 'Region'],
                          'ignoreMissing': True})
print('Set ignoreMissing as true to avoid an unmatched key error:',
      dic_subset.getInfo())