-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I have a geojson that contains all the configurations for the lakes of my model. Many of the configurations are strings. When stored to geojson and later loaded, the empty fields are represented by empty strings. To be expected I would say.
However, in the code the methods .isna(), notna() are used and they don't mark "" as na.
pd.isna("")
Falselake_gdf["lakeout"].isna() | lake_gdf["lakeout"].eq("") could be used instead. Or on the user side do gdf.replace("", None).
An example are the boundary names in lakeout column. How are you guys handling the columns with a string data type and missing values?
My goejson:
https://github.com/NHFLO/data/blob/main/src/nhflodata/data/mockup/lakes_pwn/v1.0.0/lakes_pwn.geojson
Line 211 in 736bc46
| if use_outlets and (not lake_gdf["lakeout"].isna().all()): |
Line 274 in 736bc46
| if pd.isna(datavar): # None or nan |