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

df = pd.read_csv('../input/BRAZIL_CITIES.csv', sep=';', decimal=',')

df.fillna(0.0, inplace=True)

print(f"total foreign population: {df['IBGE_RES_POP_ESTR'].sum():10.0f}")
print(f"% of foreign population {df['IBGE_RES_POP_ESTR'].sum() / df['IBGE_RES_POP'].sum() * 100:10.2f}")