geetools.ImageCollection.ImageCollectionAccessor.containsAnyBands#
- geetools.ImageCollection.ImageCollectionAccessor.containsAnyBands(bandNames)#
Filter the ImageCollection keeping only the images with any of the provided bands.
- Parameters:
bandNames (geetools.types.ee_list) – list of band names to filter
- Returns:
A filtered ImageCollection
- Return type:
ee.ImageCollection
Examples
import ee, geetools ee.Initialize() collection = ( ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA") .filterBounds(ee.Geometry.Point(-122.262, 37.8719)) .filterDate("2014-01-01", "2014-12-31") ) filtered = collection.ldc.containsAnyBands(["B1", "B2"]) print(filtered.getInfo())