zhangfengcdt commented on code in PR #2046:
URL: https://github.com/apache/sedona/pull/2046#discussion_r2202059319
##########
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 think the issue is that if user get that error, e.g., WKBReadingError
because of empty byte strings are not valid WKB representations, they won't be
able to know what to do and where that wkb come from - unless if they pass that
as a parameter explicitly. We would either:
- add a document to tell user what the error WKBReadingError meant to them or
- process / skip them as NA values
Either way, this should be documented in the public method, i.e.,
to_geopandas
--
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]