I have noticed a bug while trying to convert a dataframe to a featureset using spatial.to_featureset(). It seems to be changing all my datetime fields to the same value in each feature. I have tested this with multiple dataframes, both regular pandas and spatially enabled.
I had been running a script that updates a feature service using data from a spatially enabled dataframe by converting it to a featureset and then using edit_features(). The script had been working fine until recently. I am thinking this issue started happening when we upgraded to ArcGIS Pro 3.2.0, but I have not confirmed that yet. Is this a known bug in the new api release? I am trying to roll back the version and test that theory but have been unable to so due to certain IT restrictions. Any help would be appreciated.
I have just tested and can confirm that this issue is not happening in an older version of the API, so it is an issue with version 2.2.0.
Looks like the issue will be resolved in 2.3.
Hi,
I am using argis package version 2.0.1 and it appears to be an issue in this version. I have been trying to troubleshoot where the change in datetimes occurs in a scripl figuring it was earlier in the script tool but I've narrowed it down to later when I use the spatial.to_featureset()
I also found the link below on github.
I have to admit its pretty discouraging since I've been working to update code from arcpy to the API only to run into this bug.
df = s_lyr.query(where = AK_dt_fltr, out_sr = 26931).sdf
gsa = GeoSeriesAccessor(df['SHAPE'])
df['LENGTH_NM'] = gsa.get_length('PLANAR', 'NAUTICALMILES')
s_lyr.edit_features(updates = df.spatial.to_featureset())