Skip to content

Instantly share code, notes, and snippets.

@Mooophy
Created August 31, 2015 13:31
Show Gist options
  • Select an option

  • Save Mooophy/4c070b83abd0b377beb0 to your computer and use it in GitHub Desktop.

Select an option

Save Mooophy/4c070b83abd0b377beb0 to your computer and use it in GitHub Desktop.
np.percentile([1,2,3,4,5,6,7,8,9,10], 50)
#5.5
np.percentile([1,2,3,4,5,6,7,8,9,10], 25)
#3.25
np.percentile([1,2,3,4,5,6,7,8,9,10], 75)
#7.75
quantile(c(1,2,3,4,5,6,7,8,9,10))
# output:
# 0% 25% 50% 75% 100%
# 1.00 3.25 5.50 7.75 10.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment