

{"id":22285,"date":"2018-07-23T03:15:52","date_gmt":"2018-07-23T03:15:52","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=22285"},"modified":"2026-04-28T12:26:23","modified_gmt":"2026-04-28T06:56:23","slug":"python-descriptive-statistics","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/","title":{"rendered":"Python Descriptive Statistics &#8211; Measuring Central Tendency &amp; Variability"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1874,&quot;href&quot;:&quot;https:\\\/\\\/docs.python.org\\\/3\\\/library\\\/statistics.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251011133248\\\/https:\\\/\\\/docs.python.org\\\/3\\\/library\\\/statistics.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 05:55:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 13:08:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-07 16:00:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-13 03:32:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-17 14:48:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-21 09:49:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-30 10:53:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 14:54:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 09:19:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 09:26:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 13:43:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-29 11:11:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 08:09:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 09:43:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 05:51:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 15:31:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-28 04:42:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-07 14:11:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-13 06:51:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-16 14:04:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-31 18:13:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-08 06:54:35&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-08 06:54:35&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>In our last tutorial, we studied <a href=\"https:\/\/data-flair.training\/blogs\/python-charts\/\" target=\"_blank\" rel=\"noopener\"><strong>Python Charts<\/strong><\/a>. Today, we will learn about Python Descriptive Statistics. In this Python Statistics tutorial, we will discuss what Data Analysis, Central Tendency in Python is: mean, median, and mode. Moreover, we will discuss Python Dispersion and Python Pandas Descriptive Statistics. Along with this, we will cover the variance in Python and how to calculate the variability for a set of values.<\/p>\n<p>So, let\u2019s begin the Python Descriptive Statistics Tutorial.<\/p>\n<h3>Data Analysis<\/h3>\n<p>With data analysis, we use two main statistical methods- <em>Descriptive<\/em> and <em>Inferential<\/em>.<\/p>\n<ul>\n<li><strong>Descriptive statistics<\/strong> uses tools like mean and standard deviation on a sample to summarize data.<\/li>\n<li><strong>Inferential statistics<\/strong>, on the other hand, looks at data that can randomly vary and then draws conclusions from it.<\/li>\n<\/ul>\n<p>Some such variations include observational errors and sampling variation.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-collections-module\/\">Do you know about the Python Collection Module<\/a><\/strong><\/p>\n<h3 class=\"western\">Descriptive Statistics in Python<\/h3>\n<p>Python Descriptive Statistics process describes the basic features of data in a study. It delivers summaries on the sample and the measures and does not use the data to learn about the population it represents.<\/p>\n<p>Under descriptive statistics, fall into two sets of properties-<em> central tendency<\/em> and <em>dispersion<\/em>. Python Central tendency characterizes one central value for the entire distribution. Measures under this include mean, median, and mode. Python Dispersion is the term for a practice that characterizes how far apart the members of the distribution are from the center and from each other. Furthermore, Variance\/Standard Deviation is one such measure of variability.<\/p>\n<h3 class=\"western\">Central Tendency in Python\u00a0Descriptive Statistics<\/h3>\n<p>We have seen what central tendency or central location is. Now, let\u2019s take a look at all the functions Python caters to us to calculate the central tendency for a distribution. For this, let\u2019s import the <em>Python<\/em>\u00a0<i>statistics<\/i> module.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt;import statistics as st<\/pre>\n<div id=\"attachment_22312\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Central-Tendency-in-Python-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22312\" class=\"wp-image-22312 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Central-Tendency-in-Python-01.jpg\" alt=\"Python Descriptive Statistics - Central Tendency\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Central-Tendency-in-Python-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Central-Tendency-in-Python-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Central-Tendency-in-Python-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Central-Tendency-in-Python-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Central-Tendency-in-Python-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-22312\" class=\"wp-caption-text\">Python Descriptive Statistics &#8211; Central Tendency<\/p><\/div>\n<h4 class=\"western\">a. mean() in Python<\/h4>\n<p>This function returns the arithmetic average of the data it operates on. If called on an empty container of data, it raises a StatisticsError.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; nums=[1,2,3,5,7,9]\r\n&gt;&gt;&gt; st.mean(nums)<\/pre>\n<p>4.5<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.mean([-2,-4,7]) #Negative numbers<\/pre>\n<p>0.3333333333333333<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; from fractions import Fraction as fr\r\n&gt;&gt;&gt; st.mean((fr(3,4),fr(5,7),fr(2,1))) #Fractions<\/pre>\n<p>Fraction(97, 84)<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.mean({1:\"one\",2:\"two\",3:\"three\"}) #Keys from a dictionary<\/pre>\n<p>2<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-modules-vs-packages\/\">Do you know the difference between Python Modules vs Packages<\/a><\/strong><\/p>\n<h4 class=\"western\">b. mode() in Python<\/h4>\n<p>This function returns the most common value in a set of data. This gives us a great idea of where the center lies.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; nums=[1,2,3,5,7,9,7,2,7,6]\r\n&gt;&gt;&gt; st.mode(nums)<\/pre>\n<p>7<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.mode(['A','B','b','B','A','B'])<\/pre>\n<p>&#8216;B&#8217;<\/p>\n<h4 class=\"western\">c. median() in Python<\/h4>\n<p>For data of odd length, this returns the middle item; for that of even length, it returns the average of the two middle items.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median(nums) #(5+6)\/2<\/pre>\n<p>5.5<\/p>\n<h4 class=\"western\">d. harmonic_mean() in Python<\/h4>\n<p>This function returns the harmonic mean of the data. For three values a, b, and c, the harmonic mean is-<br \/>\n3\/(1\/a + 1\/b +1\/c)<br \/>\nIt is a measure of the center; one such example would be speed.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.harmonic_mean([2,4,9.7])<\/pre>\n<p>3.516616314199396<br \/>\nFor the same set of data, the arithmetic mean would give us a value of 5.233333333333333.<\/p>\n<h4 class=\"western\">e. median_low() in Python<\/h4>\n<p>When the data is of an even length, this provides us with the low median of the data. Otherwise, it returns the middle value.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median_low([1,2,4])<\/pre>\n<p>2<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median_low([1,2,3,4])<\/pre>\n<p>2<\/p>\n<h4 class=\"western\">f. median_high() in Python<\/h4>\n<p>Like median_low, this returns the high median when the data is of an even length. Otherwise, it returns the middle value.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median_high([1,2,4])<\/pre>\n<p>2<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median_high([1,2,3,4])\r\n<\/pre>\n<p>3<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/cgi-programming-python\/\" target=\"_blank\" rel=\"noopener\">Let&#8217;s Learn CGI Programming in Python with Functions and Modules<\/a><\/strong><\/p>\n<h4 class=\"western\">g. median_grouped() in Python<\/h4>\n<p>This function uses interpolation to return the median of grouped continuous data. This is the 50<sup>th <\/sup>percentile.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median([1,3,3,5,7])<\/pre>\n<p>3<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median_grouped([1,3,3,5,7],interval=1)<\/pre>\n<p>3.25<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.median_grouped([1,3,3,5,7],interval=2)<\/pre>\n<p>3.5<\/p>\n<h3 class=\"western\">Dispersion in Python\u00a0Descriptive Statistics<\/h3>\n<p>Dispersion\/spread gives us an idea of how the data strays from the typical value.<\/p>\n<div id=\"attachment_22303\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Dispersion-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22303\" class=\"wp-image-22303 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Dispersion-01.jpg\" alt=\"Python Descriptive Statistics - Dispersion\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Dispersion-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Dispersion-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Dispersion-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Dispersion-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Dispersion-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-22303\" class=\"wp-caption-text\">Python Descriptive Statistics &#8211; Dispersion<\/p><\/div>\n<h4 class=\"western\">a. variance() in Python<\/h4>\n<p>This returns the variance of the sample. This is the second moment about the mean, and a larger value denotes a rather spread-out set of data. However, you can use this when your data is a sample out of a population.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.variance(nums)<\/pre>\n<p>7.433333333333334<\/p>\n<h4 class=\"western\">b. pvariance() in Python<\/h4>\n<p>This returns the population variance of the data. Use this to calculate variance from an entire population.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.pvariance(nums)<\/pre>\n<p>6.69<\/p>\n<h4 class=\"western\">c. stdev() in Python<\/h4>\n<p>This returns the standard deviation for the sample. This is equal to the square root of the sample variance.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.stdev(nums)<\/pre>\n<p>2.7264140062238043<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-namespace-and-variable-scope\/\" target=\"_blank\" rel=\"noopener\">Read about Python Namespace and Variable Scope \u2013 Local and Global Variables<\/a><\/strong><\/p>\n<h4 class=\"western\">d. pstdev() in Python<\/h4>\n<p>This returns the population standard deviation. Hence, this is the square root of population variance.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; st.pstdev(nums)<\/pre>\n<p>2.5865034312755126<br \/>\nThe <i>statistics<\/i> module defines one exception-<br \/>\n<strong><i>exception<\/i> statistics.StatisticsError<\/strong><br \/>\nThis is a subclass of ValueError.<\/p>\n<h3 class=\"western\">Pandas with Descriptive Statistics in Python<\/h3>\n<p>We can do the same things using pandas, too-<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; import pandas as pd\r\n&gt;&gt;&gt; df=pd.DataFrame(nums)\r\n&gt;&gt;&gt; df.mean()<\/pre>\n<p>0 4.9<br \/>\ndtype: float64<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/pandas-tutorial\/\" target=\"_blank\" rel=\"noopener\">Follow this to know more about Python Pandas<\/a><\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; df.mode()<\/pre>\n<p>0 7<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; df.std() #Standard deviation<\/pre>\n<p>0 2.726414<br \/>\ndtype: float64<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; df.skew()<\/pre>\n<p>0 -0.115956 #The distribution is symmetric<br \/>\ndtype: float64<br \/>\nA value less than -1 is skewed to the left; a value greater than 1 is skewed to the right. A value between -1 and 1 is symmetric.<\/p>\n<p>So, this was all about\u00a0Python Descriptive Statistics Tutorial. Hope you like our explanation.<\/p>\n<h3 class=\"western\">Conclusion<\/h3>\n<p>As a result, Central tendency measures help you understand the center of your data. The most common measures are mean, median, and mode. These values represent where most of your data points lie. In Python, functions like mean(), median(), and mode() from libraries like NumPy and statistics make it easy to compute these values. Central tendency gives you a quick snapshot of your dataset\u2019s behavior.<\/p>\n<p><strong>Key point to keep in mind:<\/strong><\/p>\n<ul>\n<li>The descriptive statistics provide us with a summary of the data.<\/li>\n<li>The median is the middle value in a dataset.<\/li>\n<li>Arithmetic mean calculates the average value of the given data.<\/li>\n<li>A mode is the value that has appeared multiple times in a dataset.<\/li>\n<li>The range gives out the difference between the largest and the smallest value.<\/li>\n<li>The variance and standard deviation help in calculating the average distance from the mean.<\/li>\n<\/ul>\n<p>Related Topic- <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-numpy-tutorial\/\" target=\"_blank\" rel=\"noopener\">Python NumPy Tutorial<\/a><\/strong><br \/>\n<strong><a href=\"https:\/\/docs.python.org\/3\/library\/statistics.html\">For reference<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last tutorial, we studied Python Charts. Today, we will learn about Python Descriptive Statistics. In this Python Statistics tutorial, we will discuss what Data Analysis, Central Tendency in Python is: mean, median,&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":22302,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[3977,10491,10855,10856,10857,10858,10859,16250],"class_list":["post-22285","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-dispersion-in-python-statistics","tag-python-descriptive-statistics","tag-python-statistics","tag-python-statistics-central-tendency","tag-python-statistics-dispersion","tag-python-statistics-module","tag-python-statistics-tutorial","tag-working-of-data-analysis"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Descriptive Statistics - Measuring Central Tendency &amp; Variability - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about Python Statistics Module, pandas with Descriptive Statistics in Python, Python Central Tendency, Python Dispersion, Python Mean\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Descriptive Statistics - Measuring Central Tendency &amp; Variability - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about Python Statistics Module, pandas with Descriptive Statistics in Python, Python Central Tendency, Python Dispersion, Python Mean\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-23T03:15:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-28T06:56:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Descriptive-Statistics-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Descriptive Statistics - Measuring Central Tendency &amp; Variability - DataFlair","description":"Learn about Python Statistics Module, pandas with Descriptive Statistics in Python, Python Central Tendency, Python Dispersion, Python Mean","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/","og_locale":"en_US","og_type":"article","og_title":"Python Descriptive Statistics - Measuring Central Tendency &amp; Variability - DataFlair","og_description":"Learn about Python Statistics Module, pandas with Descriptive Statistics in Python, Python Central Tendency, Python Dispersion, Python Mean","og_url":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-07-23T03:15:52+00:00","article_modified_time":"2026-04-28T06:56:23+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Descriptive-Statistics-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Python Descriptive Statistics &#8211; Measuring Central Tendency &amp; Variability","datePublished":"2018-07-23T03:15:52+00:00","dateModified":"2026-04-28T06:56:23+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/"},"wordCount":948,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Descriptive-Statistics-01.jpg","keywords":["Dispersion in Python Statistics","Python Descriptive Statistics","Python Statistics","Python Statistics Central Tendency","Python Statistics Dispersion","Python Statistics Module","Python Statistics tutorial","Working of Data Analysis"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/","url":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/","name":"Python Descriptive Statistics - Measuring Central Tendency &amp; Variability - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Descriptive-Statistics-01.jpg","datePublished":"2018-07-23T03:15:52+00:00","dateModified":"2026-04-28T06:56:23+00:00","description":"Learn about Python Statistics Module, pandas with Descriptive Statistics in Python, Python Central Tendency, Python Dispersion, Python Mean","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Descriptive-Statistics-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-Descriptive-Statistics-01.jpg","width":1200,"height":628,"caption":"Python Descriptive Statistics - Measuring Central Tendency &amp; Variability"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-descriptive-statistics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python Descriptive Statistics &#8211; Measuring Central Tendency &amp; Variability"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/22285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=22285"}],"version-history":[{"count":11,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/22285\/revisions"}],"predecessor-version":[{"id":147996,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/22285\/revisions\/147996"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/22302"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=22285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=22285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=22285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}