I have an ArcGIS Online hosted featurelayer that is used to collect data through ArcGIS Field Maps. Data is collected on a yearly basis, and after each year, I create a copy of the hosted feature layer. The new copy each year drops all of the collected values but maintains geometry, OID, et cetera. Collection fields to be reset are of type String, int, double.
When attempting to create a dataframe using ArcGIS API for Python,
sdf = pd.DataFrame.spatial.from_layer(COLLECTION_LAYER)
COLLECTION_LAYER is arcgis.gis.Layer instance pointing to my data collection table.
I'm thrown an IntCastingNaNError
with message;
Exception: Could not load the dataset: Cannot convert non-finite values (NA or inf) to integer
because I am attempting to create a numpy array / pandas series of type int where all / most of the values are None
.
I've tried to find a workaround using pd.df.fillnan() but I am unable to instantiate the dataframe to call any class methods.
I've considered using minimum integer value on AGOL using arcade, but presenting that value is awkward when collecting and analyzing the data. -1 is also not an option, because -1 is a valid entry value.
Is there a standard for representing unknown signed int's in GIS? I'm currently using an arbitrary negative int to represent unknown, but that is far from ideal.
TL;DR represent an unknown int value AGOL -> Python -> SQL -> AGOL
None
value actually an empty value or a string of "None" in the attribute table?