Create the Mean and Standard Deviation of the Data of a Pandas Series Improve Improve Like Article Like Save Share Report Standard Deviation is the square root of the Variance. The Standard Deviation denoted by sigma is a measure of the spread of numbers. In pandas, the std() function is used to find the standard Deviation of the series. The mean can be simply defined as the average of numbers. In pandas, the mean() function is used to find the mean of the series. Example 1 : Finding the mean and Standard Deviation of a Pandas Series. # importing the module import pandas as pd # creating a series s = pd.Series(data = [5, 9, 8, 5, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 5, 3]) # displaying the series print(s) Output : Finding the mean of the series using the mean() function. # finding the mean print(s.mean()) Output : Finding the standard deviation of the series using the std() function. # finding the Standard deviation print(s.std()) Output : Example 2 : Finding the mean and Standard Deviation of a Pandas DataFrame. # importing the module import pandas as pd # creating a dataframe df = pd.DataFrame({'ID':[114, 345, 157788, 5626], 'Product':['shirt', 'trousers', 'tie', 'belt'], 'Color':['White', 'Black', 'Red', 'Brown'], 'Discount':[10, 10, 10, 10]}) # displaying the DataFrame print(df) Output : Finding the mean of the DataFrame using the mean() function. # finding the mean print(df.mean()) Output : Finding the standard deviation of the DataFrame using the std() function. # finding the Standard deviation print(df.std()) Output : Last Updated : 17 Aug, 2020 Like Article Save Article Previous Python | Pandas Series.str.get_dummies() Next PostgreSQL - Connect To PostgreSQL Database Server in Python Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Python | Pandas Series.mad() to calculate Mean Absolute Deviation of a Series How to Plot Mean and Standard Deviation in Pandas? Absolute Deviation and Absolute Mean Deviation using NumPy | Python Compute the mean, standard deviation, and variance of a given NumPy array How to calculate probability in a normal distribution given mean and standard deviation in Python? Calculate the average, variance and standard deviation in Python using NumPy Calculate standard deviation of a dictionary in Python Calculate pooled standard deviation in Python Calculate standard deviation of a Matrix in Python Standard Deviation Plot Like Y yash41997 Follow Article Tags : Python pandas-series Python-pandas Python Practice Tags : python