I am using the Earth Engine Python API and attempting to extract date and NDVI values from an image collection. I have added an NDVI band to each image in the collection but I am having trouble figuring out how to extract the actual NDVI value from each band in order to produce a dataframe of an NDVI time series.
I am creating an NDVI band with the code below
nir = img.select('B5')
red = img.select('B4')
ndvi = nir.subtract(red).divide(nir.add(red)).rename('NDVI')
print('NDVI value:', ndvi.select('NDVI').getInfo())
and I am receiving info from the NDVI band in the form of
NDVI value: {'type': 'Image', 'bands': [{'id': 'NDVI', 'data_type': {'type': 'PixelType', 'precision': 'float'}, 'dimensions': [492, 492], 'origin': [2368, 3104], 'crs': 'EPSG:32612', 'crs_transform': [30, 0, 175185, 0, -30, 5063115]}]}
The documentation on accessing computed NDVI values is limited and I have been scanning tutorials and other exchange posts for ee api related solutions but have found nothing. Any help would be greatly appreciated!