Skip to content

Instantly share code, notes, and snippets.

@lauramsfernandes
Created June 6, 2021 12:34
Show Gist options
  • Save lauramsfernandes/77f9a06d4870d0c314458c2283da4e22 to your computer and use it in GitHub Desktop.
Save lauramsfernandes/77f9a06d4870d0c314458c2283da4e22 to your computer and use it in GitHub Desktop.
reverse_length_mapping ={1 : 'Short',
2 : 'Medium',
3 : 'Long' }
df['Length'] = df['Length'].map(reverse_length_mapping)
df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment