In [126]: df.replace(['very bad', 'bad', 'poor', 'good', 'very good'], [1, 2, 3, 4, 5]) Out[126]: resp A B C 013341243423555342324511156341674447855589221910111
You must state where the result should be saved. If you say only data.replace(...) it is only shown as a change in preview, not in the envirable itself.