def converte():
remove = lambda x: x.str.replace(',', '.').astype('float')
colunas = ['Pop_density', 'Coastline_ratio', 'Net_migration', 'Infant_mortality', 'Literacy', 'Phones_per_1000', 'Arable', 'Crops', 'Other', 'Climate', 'Birthrate', 'Deathrate', 'Agriculture', 'Industry', 'Service']
for item in colunas:
df[item] = df[item].apply(remove)
converte()
def converte():
remove = lambda x: x.str.replace(',', '.').astype('float')
colunas = ['Pop_density', 'Coastline_ratio', 'Net_migration','Infant_mortality', 'Literacy', 'Phones_per_1000', 'Arable', 'Crops', 'Other', 'Climate', 'Birthrate', 'Deathrate', 'Agriculture', 'Industry', 'Service']
for item in colunas:
countries[item] = countries[item].apply(remove)
converte()