I have been struggling all day with this. I wish Python were more like SQL it would be so easy for me, but I am still learning.
Basically, I just want to group numbers based on their first four digits, and then find the min and max of those numbers for each group.
Consider a dataset of doubles:
[VALUES] 11112222 11113333 11114444 55556666 55557777 55558888
and the result I want is like this:
- for all numbers begining with 1111, the minimum value is 11112222 and the maximum value is 11114444
- for all numbers begining with 5555, the minimum value is 55556666 and the maximum value is 55558888
I have considered making a layer in ArcMap from my feature class and using SQL to select from there, but I just can't figure out the query it never seems to work.
I've spent most of my time trying a search cursor, but that is not working out very well for me either as I can't seem to use where clauses correctly.
Is there anyway I can just bring in the data as a list or dictionary or something and perform everything from there?