Displaying 1 result from an estimated 1 matches for "ordereddata".
Did you mean:
orderedaa
2010 Apr 13
2
efficiently picking one row from a data frame per unique key
Hello all, I'm trying to transform data frames by grouping the rows by the
values in a particular column, ordered by another column, then picking the
first row in each group.
I'd like to convert a data frame like this:
x y z
1 10 20
1 11 19
2 12 18
4 13 17
into one with three rows, like this, where i've discarded one row:
x y z
1 1 11 19
2 2 12 18
4 4 13 17
I've got a