I have the following dataframe, where :a and :b are some conditions and :c is an output:
df = DataFrame(a=[1,1,2,2,1], b=[1,2,1,2,1],c=randn(5))
As you can see, the last row has the same conditions as first row (a=1, b=1). How can I filter this dataframe in order to remove duplicates based on columns :a and :b, but to keep the last occurence? The
unique function keeps the first occurence. I tried to
reverse! the dataframe and then apply
unique, but this method is not implemented.