import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
 
df = pd.read_excel('Tab_Compl_CNT_1T18.xls', sheet_name=3)

df.columns = ['Trimestre', \
              'Agro', \
              'IndExt', 'IndTransf', 'IndEnerSan', 'IndConst', 'IndTotal', \
              'SerCom', 'SerTransp', 'SerInfo', 'SerFin', 'SerImob', 'SerOutros', 'SerPublicos', 'SerTotal', \
              'VA', 'Imposto', \
              'PIBTotal', \
              'ConsFamilia', 'ConsGov', \
              'FBCF', 'Exp', 'Imp']

df_agro = df[['Trimestre','Agro', 'PIBTotal']].iloc[3:]

df_agro.set_index(['Trimestre'], inplace=True)

print(df_agro.head())
print()
print(df_agro.tail(20))
print()

plt.title('PIB por Setores: AGRO')
df_agro['Agro'].plot()
df_agro['PIBTotal'].plot()
plt.legend(loc=4)
plt.xlabel('Data')
plt.ylabel('PIB')
plt.show()