Created
March 19, 2015 01:14
-
-
Save skillachie/be1d6f55fb4b6e23e97a to your computer and use it in GitHub Desktop.
qcut error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
unique = [1,2,3,4,5,6,7,8,9,10,11,12,13,51,52,55] | |
df1= pd.qcut(unique,10,[1,2,3,4,5,6,7,8,9,10]) | |
print df1 | |
print 'works' | |
# represents cases when we simply have 0/na for some deciles | |
# Need to fix | |
non_unique = results = [1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5] | |
df2= pd.qcut(non_unique,10,[1,2,3,4,5,6,7,8,9,10]) | |
print df2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment