I am trying to map the value "Others" to a "Career" column, according to some criteria. For example, when the column contains the Binder or Helper value, I want this value to be replaced with the Other value. The command below is running without error:
aip['Carreira'] = aip['Carreira'].map({'Chefe de Limpeza': 'Outros', 'Lixeiro': 'Outros', 'Auxiliar de Limpeza': 'Outros', 'Ajudante': 'Outros', 'Carreira Externa': 'Outros' })
The problem is that when you run this command, all other columns are replaced by the NAN value, ie not only the Career column being affected, but all others. How to heal?