Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

calculate mean median mode in python

>>> import statistics

>>> statistics.median([3, 5, 1, 4, 2])
3

>>> statistics.median([3, 5, 1, 4, 2, 6])
3.5
Comment

PREVIOUS NEXT
Code Example
Python :: Converting Dataframe from the multi-dimensional list 
Python :: turn off warning when import python 
Python :: bucketizer pyspark 
Python :: UTC to ISO 8601 with TimeZone information (Python 3): 
Python :: discord py check if user has permission return message if not 
Python :: python 3d array 
Python :: python dictionary default 
Python :: join dataframe pandas by column 
Python :: _ variable in python 
Python :: Convert two lists into a dictionary in python 
Python :: Python Changing Directory 
Python :: redirect a post request django 
Python :: python optional arguments 
Python :: save numpy array 
Python :: np.arange and np.linspace difference 
Python :: matplotlib subplots 
Python :: Python program to draw hexagon 
Python :: python array input from user 
Python :: how to convert dataframe to text 
Python :: add two numbers in python 
Python :: Download video from a direct URL with Python 
Python :: how to check substring in python 
Python :: how to square root in python 
Python :: open excel through python 
Python :: python dictionary append 
Python :: howe to print all values and keysin d 
Python :: multiprocessing print does not work 
Python :: get last 3 things in a list python 
Python :: pands correlation matrix to dataframe 
Python :: python defaultdict(list) 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =