I have a class for example:
class Row(object):
def __init__(self, res_json):
test = res_json['test']
value = res_json['value']
year = res_json['date'][0:4]
If I have a list of row objects and want to group them by year what's the best way to do this?