Skip to content

Instantly share code, notes, and snippets.

@jiobu1
Last active March 3, 2021 16:22
Show Gist options
  • Save jiobu1/abca8f9854f6399f51420f557a517743 to your computer and use it in GitHub Desktop.
Save jiobu1/abca8f9854f6399f51420f557a517743 to your computer and use it in GitHub Desktop.
pd.qcut()
combined_csv['Crime Rating'] = pd.qcut(
combined_csv['Crime Rate (per 1000 residents)'],
q=3,
labels=['Low', 'Medium', 'High'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment