text_plain_output_1.png image_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

cota = pd.read_csv('../input/cota_parlamentar_sp.csv', delimiter=';')
cota.dataframeName = 'cota_parlamentar_sp.csv'
nRow, nCol = cota.shape

cota_total = pd.DataFrame(cota.groupby(['sgpartido'])['vlrdocumento'].sum().sort_values(ascending=False))
cota_total2 = cota_total.head(5)
cota_por_ano = pd.DataFrame(cota.groupby('numano')['vlrdocumento'].sum())
cota_por_ano