Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

difference between cut and qcut pandas

interval_range = pd.interval_range(start=0, freq=10000, end=200000)
df['cut_ex2'] = pd.cut(df['ext price'], bins=interval_range, labels=[1,2,3])
df.head()

#There is a downside to using interval_range . You can not define custom labels.
Source by pbpython.com #
 
PREVIOUS NEXT
Tagged: #difference #cut #qcut #pandas
ADD COMMENT
Topic
Name
7+6 =