DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas add quantile columns
df['quantile'] = pd.qcut(df['b'], 2, labels=False) a b quantile 0 1 1 0 1 2 10 0 2 3 100 1 3 4 100 1
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#pandas
#add
#quantile
#columns
ADD COMMENT
Topic
COMMENT
Name
6+4 =
Submit