geostevo

*Basic* Py Field Calc Question

Discussion created by geostevo on Aug 15, 2011
Latest reply on Aug 15, 2011 by geostevo
I've tried to find the answer to my question on the forums; came close with Frequency Tool...

I'm working with a table trying to do the following:

In one field I have various 3-digit codes. Many of them are duplicates. In another field I have single digit codes. I need to flag cases where there are duplicate 3-digit codes, that also contain different single-digit codes.

E.G.

[3d]  [1d]  [Flag]
541     9
542     8       !
542     8       !
542     2       !
543     4
543     4
543     4
544     9
545     8

In this case I'm concerned with all rows starting with [542], as that is the 3-digit number where there is a discrepancy between the 1-digit code (for that particular 3-digit code).

Any help is greatly appreciated!!!

Again I came close with the Frequency tool but the Sum function in it didn't quite get me there. I have no problem marking the duplicates of the 3-digit field in a new integer field. It's just dealing with the two part need that's been challenging.

Outcomes