I would like to know if is possible, maybe with some of code, to avoid repeating labels of different elements of my layer if these have the same value. 
I attach this example:
  
[![enter image description here][1]][1] 


  [1]: https://i.sstatic.net/gWpE4.png

These are two elements with the same value in "nam" column. There are other examples which have 20 elements with the same value for example.