Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas turn counts into probability

df['prob_x'] = df['x'] / df['x'].sum()
 
PREVIOUS NEXT
Tagged: #pandas #turn #counts #probability
ADD COMMENT
Topic
Name
1+1 =