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.
lake_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
|
if use_outlets and (not lake_gdf["lakeout"].isna().all()): |
|
if pd.isna(datavar): # None or nan |
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.
lake_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
nlmod/nlmod/gwf/lake.py
Line 211 in 736bc46
nlmod/nlmod/gwf/lake.py
Line 274 in 736bc46