This is a straightforward application of GatherBy
and Map
(\@/@
):
First /@ GatherBy[mydata, First]
(* {{1, a, aa}, {2, d, dd}, {3, f, ff}, {4, i, ii}, {5, n, nn}, {7, p, pp}} *)
You could also use Part
([[]]
) to get the first element of each group.
GatherBy[mydata, First][[All,1]]