-
Hi, I was following the example notebook 108 to get the maximum rainfall out of each land-use type. The error message is "ValueError: All arrays must be of the same length". I traced back to the source code and did find the 'keys' and 'values' are of different length, seems to due some landuse type does not get image coverage. But I couldn't figure out a way to get around ... I paste my script and the full error message extract here. Anyone could have a look and suggest how to fix the error would be very very much appreciated! Luxi My sript that results in error###############import geopandas as gpd time1 = '2021-07-01' image = l8.max() world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres')) landcover = ee.Image("USGS/NLCD_RELEASES/2019_REL/NLCD/2019").select('landcover') original image used in example:#dem = ee.Image('USGS/3DEP/10m') #not working: #not working either: full extract of error message belowValueError Traceback (most recent call last) File ~\AppData\Local\anaconda3\envs\gee\Lib\site-packages\geemap\common.py:7635, in image_stats_by_zone(image, zones, out_csv, labels, region, scale, reducer, bestEffort, **kwargs) File ~\AppData\Local\anaconda3\envs\gee\Lib\site-packages\pandas\core\frame.py:736, in DataFrame.init(self, data, index, columns, dtype, copy) File ~\AppData\Local\anaconda3\envs\gee\Lib\site-packages\pandas\core\internals\construction.py:503, in dict_to_mgr(data, index, columns, dtype, typ, copy) File ~\AppData\Local\anaconda3\envs\gee\Lib\site-packages\pandas\core\internals\construction.py:114, in arrays_to_mgr(arrays, columns, index, dtype, verify_integrity, typ, consolidate) File ~\AppData\Local\anaconda3\envs\gee\Lib\site-packages\pandas\core\internals\construction.py:677, in _extract_index(data) ValueError: All arrays must be of the same length |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Try specifying the |
Beta Was this translation helpful? Give feedback.
Try specifying the
labels
parameter.https://geemap.org/common/?h=image_sta#geemap.common.image_stats_by_zone