Select to view content in your preferred language

Simplify concatenated values

111
1
2 weeks ago
PabloOliver
New Contributor

hello,

I am concatenating values in a Dissolve tool in a model. The concatenated values are appear correctly in the final result, however, there are multiple instances of the same value in the result. I'm looking for a way to simplify the result so that only one instance of each unique value appear in the final result.

any ideas?

 

thanks

PO

 

 

0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

you could do a separate field calculation

 

row = 'c, d, a, b, c, e, a, c'

",".join(sorted(set([i.strip() for i in row.split(",")])))
'a,b,c,d,e'

 


... sort of retired...
0 Kudos