Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

classe statistique dataframe python

# Splitting Age Column into Four Quantiles
df['Age Groups'] = pd.qcut(df['Age'], 4)
print(df.head())

# Returns:
#      Name  Age     Age Groups
# 0     Ray   12  (6.999, 17.0]
# 1    Jane    7  (6.999, 17.0]
# 2    Kate   33   (17.0, 33.5]
# 3     Nik   34   (33.5, 52.5]
# 4  Autumn   45   (33.5, 52.5]
Comment

PREVIOUS NEXT
Code Example
Python :: tag for deleting a list in python 
Python :: how to do processing on html file using python 
Python :: How to efficiently create a median finder for a stream of values, in Python? 
Python :: array comparison in percent 
Python :: how to pronounce aesthetic 
Python :: pandas dataframe select rows not in list 
Python :: os.remove directory 
Python :: how to know how much lines a file has using python 
Python :: merge multiple csv files into one dataframe python 
Python :: python yyyymmdd 
Python :: python create tuple from input 
Python :: cv2 waitkey 
Python :: pandas sample seed 
Python :: sklearn adjusted r2 
Python :: pickle dump 
Python :: print zip object python 
Python :: python open dicom file 
Python :: python seconds counter 
Python :: only include top ten items django for loop 
Python :: python scratch cloud variabelen 
Python :: open applications by python 
Python :: find two number in python 
Python :: python get current time in hours minutes and seconds 
Python :: python difference between unique and nunique 
Python :: list to set keep order python 
Python :: python set label colour 
Python :: pandas replace nulls with zeros 
Python :: split dataset into train, test and validation sets 
Python :: barabasi albert graph networkx 
Python :: opencv histogram equalization 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =