How to merge table cells in same row

I’m wondering if there is a way to merge table cells in the same row that have the same value.
So if my table looks like:
a b c
1 2.3 | 2.7 | 2.9
2 2.1 | 2.1 | 2.3
3 2.1 | 2.4 | 2.4
4 2.4 | 2.4 | 2.4

I want it to look like:
a b c
1 2.3 | 2.7 | 2.9
2 2.1 | 2.3
3 2.1 | 2.4
4 2.4