So I have performed Spatial Join between a point and line feature class. Now for each point there are several lines. What I want is the maximum count of line features as an attribute value in the "Count" field based on "label" field same attribute values.
I have thought of few ways to do it but isn't working exactly. I can also add a new field and write the maximum of those "Count" values there.
Here I was trying to convert it into a numpy array and then calculate the maximum.
'''try:
arr_label_count= arcpy.da.FeatureClassToNumPyArray("SPATIAL_JOIN_OUTPUT_Splice_Closures_Fibre_Drop_copy",
["label", "Count"], skip_nulls=True)
arcpy.AddMessage(arr_label_count)
except Exception as e:
arcpy.AddMessage("Issue in arr_label_count...: " + str(e))
try:
arr_label= arcpy.da.FeatureClassToNumPyArray("SPATIAL_JOIN_OUTPUT_Splice_Closures_Fibre_Drop_copy",
["label"], skip_nulls=True)
arcpy.AddMessage(arr_label)
filtered_arr_label = self.remove_duplicates(arr_label)
# arcpy.AddMessage(filtered_arr_label)
except Exception as e:
arcpy.AddMessage("Issue in arr_label_count...: " + str(e))'''