Skip to content

Instantly share code, notes, and snippets.

View tolentinorenan's full-sized avatar

Renan de Almeida tolentinorenan

View GitHub Profile
@luizomf
luizomf / groupby_example.py
Created March 27, 2021 18:56
Groupby example in Python.
from itertools import groupby, tee
alunos = [
{'nome': 'Luiz', 'nota': 'A'},
{'nome': 'Letícia', 'nota': 'B'},
{'nome': 'Fabrício', 'nota': 'A'},
{'nome': 'Rosemary', 'nota': 'C'},
{'nome': 'Joana', 'nota': 'D'},
{'nome': 'João', 'nota': 'A'},
{'nome': 'Eduardo', 'nota': 'B'},