Skip to content

Instantly share code, notes, and snippets.

@mzaradzki
Created July 3, 2017 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzaradzki/bead118e4bfdc93d248b40416fb7dc00 to your computer and use it in GitHub Desktop.
Save mzaradzki/bead118e4bfdc93d248b40416fb7dc00 to your computer and use it in GitHub Desktop.
nbQs = 4 # quartiles
dfX['construction_year_quantile'] = pd.qcut(dfX['construction_year'], nbQs, labels=False)/(nbQs-1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment