petern48 commented on code in PR #2046:
URL: https://github.com/apache/sedona/pull/2046#discussion_r2202090738
##########
python/sedona/geopandas/geoseries.py:
##########
@@ -537,7 +537,9 @@ def _to_geopandas(self) -> gpd.GeoSeries:
try:
return gpd.GeoSeries(
pd_series.map(
- lambda wkb: shapely.wkb.loads(bytes(wkb)) if wkb else None
+ lambda wkb: (
+ shapely.wkb.loads(bytes(wkb)) if not pd.isna(wkb) else
None
Review Comment:
I agree that it would be nice to tell the user what the error indicates, but
as I mentioned, this isn't expected behavior. In the case where an empty byte
string is returned, I think this would be our error (the Sedona developer's
error) and not the user's error, so I don't know what to tell them. Do you know
what might cause an empty byte string to be returned here? What would you
recommend specifying in the docstring?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]