Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

unction which takes in a list of integers and returns a dictionary of the five number summary..

def fivenum(x):
    series=pd.Series(x)
    mi = series.min()
    q1 = series.quantile(q=0.25, interpolation='nearest')
    me = series.median()
    q3 = series.quantile(q=0.75, interpolation='nearest')
    ma = series.max()
    return pd.Series([mi, q1, me, q3, ma], index=['min', 'q1', 'median', 'q3', 'max'])
 
PREVIOUS NEXT
Tagged: #unction #takes #list #integers #returns #dictionary #number
ADD COMMENT
Topic
Name
8+5 =