Recoding replaces or groups values: replace() or map() with a lookup dictionary, np.where or np.select for conditional rules, pd.cut to split numbers into classes. It harmonizes the categories of a variable before analysis.
Example
df['statut'] = df['code'].map({1: 'actif', 2: 'inactif'})