Closed cflann closed 1 year ago
Note: the addresses attached were generated by the tool at https://happycattools.com/fake-address-generators/oregon/. They are randomly generated and not meant to be real places, though some may end up corresponding to real addresses by simple chance.
@cflann thanks for submitting an issue, we'll take a look and get back to you when we have an update.
This will be fixed in v2.2.0 which is the next release. Thank you for reporting this.
Thanks Andrew!
Describe the bug The static method from_df only returns the final batch of results when putting dataframe addresses through a geocoder. For instance, if the geocoder has a max batch size of 100, and your dataframe as 127 rows (with addresses), the returned spatially enabled dataframe will only have 27 rows. The first 100 are silently dropped.
To Reproduce Steps to reproduce the behavior:
I've used the OR State geocoder below, but any geocoder service with a max batch size smaller than your input data will trigger the bug.
Looking at the code in my local install @
arcgis/features/geo/_accessor.py
around line 2969,merge
is being called ondf
.df
is passed as a param (the full input dataframe), but then appears to be masked by the final iteration of the loop starting on line 2956. Thus, whenmerge
is called,df
only contains the final "piece" of the complete feature set.Changing
df
in the loop to something likepiece
should avoid the naming conflict and fix the issue.error: no error, just incorrect results.
Screenshots If applicable, add screenshots to help explain your problem.
Expected behavior The method should return a spatially enabled data frame with the same number of rows as the input.
Platform (please complete the following information):
Additional context Attached is a randomly generated list of Oregon addresses to use with the OR State geocoder. or_addresses.csv