how about if you wanted to apply a keep first/last to the above situation eg:
so you kept the 2nd dog:
orig:
v1 v2 v3
148 8751704.0 G dog 123 9082007.0 G dog 123 9082007.0 G cat
after keep last applied
v1 v2 v3
123 9082007.0 G dog 123 9082007.0 G cat