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

0

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'])
Posted by: Guest on October-26-2021

Code answers related to "unction which takes in a list of integers and returns a dictionary of the five number summary.."

Python Answers by Framework

Browse Popular Code Answers by Language