Search
 
SCRIPT & CODE EXAMPLE
 

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'])
Comment

PREVIOUS NEXT
Code Example
Python :: Ranking in Pyspark 
Python :: seaborn plot to see outliers 
Python :: rolling call on one column and groupby second pandas 
Python :: geopandas nan to 0 
Python :: how to get max id in mongodb python 
Python :: sns regplot make the line and confidence interval thicker 
Python :: QuizListView login required django 
Python :: max sum slice python 5 - autopilot 
Python :: ternary operator using dictionary in Python 
Python :: using a print function 
Python :: python get unicode spaces 
Python :: print hello in python 
Python :: python csv row index is empty 
Python :: algorithme pour afficher table de multiplication python 
Python :: next function with inherited list python 
Python :: python 3.7.8 download 
Python :: how to reverse a number 
Python :: tkinter call function in mainloop 
Python :: how to comment in python 
Python :: python code to press a key 
Python :: scikit decision tree regressor 
Python :: django rest framework viewset 
Python :: how to use pyplot 
Python :: how to make a screen in pygame 
Python :: how to access variable of one function in another function in python 
Python :: numpy and operator 
Python :: counter method in python 
Python :: scaling 
Python :: Count upper case characters in a string 
Python :: df.rename(index=str, columns={"A": "a", "C": "c"}) what does index=str means 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =