I have 2 geodataframes with a geometry column and I copy some geometries from 1 to the other.
This works well with Polygons but returns a ValueError for any (valid) MultiPolygon.
Please advice how to solve this? I don't know if / how / why I should change the MultiPolygon to get "equal len keys and value"?
geodata01.loc[index, 'geometry'] = geodata02.loc[index, 'geometry']
This works well with Polygons. Only with MultiPolygons I get:
ValueError
if len(labels) != len(value):
--> 611 raise ValueError('Must have equal len keys and value '
612 'when setting with an iterable')
I also cannot do assignments of a buffered or simplified MultiPolygon either (the MultiPolygon is valid and I can plot, buffer, simplify but I cannot assign it):
geodata01.loc[index, 'geometry'] = geodata01.loc[index, 'geometry'].buffer(0)
#or
geodata01.loc[index, 'geometry'] = geodata01.loc[index, 'geometry'].simplify(tolerance=0)
This returns the same ValueError.