Starting with data formatted like this:
data = [[0,1],[2,3],[0,1],[0,2]]
I would like to represent every value once with its frequency:
output = [[[0,1],2],[[2,3],1],[[0,2],1]]
I've found many solutions to this problem for 1D lists, but they don't seem to work for 2D.