Skip to content

Instantly share code, notes, and snippets.

@sillasgonzaga
Created March 31, 2021 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sillasgonzaga/fffd7a177f6cac2a4dbbf0ccef4188c9 to your computer and use it in GitHub Desktop.
Save sillasgonzaga/fffd7a177f6cac2a4dbbf0ccef4188c9 to your computer and use it in GitHub Desktop.
# filtrar ano mais recente
df_idhm = df_idhm[df_idhm['ANO'] == np.max(df_idhm['ANO'])]
# selecionar colunas
df_idhm = df_idhm[['Codmun7', 'IDHM']]
# renomear colunas
df_idhm.columns = ['cod_municipio', 'idhm']
df_idhm.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment