Skip to content

Instantly share code, notes, and snippets.

@VibhuJawa
Created July 27, 2020 21:30
Show Gist options
  • Save VibhuJawa/c4ec64434addf3e8e863272c7e6898f2 to your computer and use it in GitHub Desktop.
Save VibhuJawa/c4ec64434addf3e8e863272c7e6898f2 to your computer and use it in GitHub Desktop.
import cudf
s = cudf.Series(['dog', 'fish', 'cat'])
s.astype('category').cat.codes
0    1
1    2
2    0
dtype: uint8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment