Why is the Frequency tool in ArcGIS is so fast and efficient?

Is it possible to make my own Frequency Tool with similar performance (in python)?

I tried to do some based on python dictionary and searchCursor but when I have more than 100,000 records to analyse it takes a long time.

  • 1
    If the reason you are looking to do this is to get Frequency functionality (which documentation says requires Advanced) with a Basic (formerly known as ArcView) license, then take a look at Summary Statistics with case_field(s) - so far I have always been able to use that in its place. – PolyGeo Jan 21 '13 at 6:48

Probably because the internal implementation uses a lower level API (ArcObjects) and a compiled language (C++) and likely has some other optimizations not exposed through arcpy.

Also in arcpy the old cursors tend to be slow; if you are at 10.1 try the arcpy.da (data access module) cursors.

If you want help with your code, post it.

  • Thanks, I improved my script with arcpy.da and works faster. – user7172 Jan 21 '13 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.