# Variable.get\_statistics

### Variable.<mark style="color:purple;">get\_statistics</mark>() → *dict*

Fetches the statistics for the variable, returning a dict corresponding to the [VariableStatistics resource definition](https://docs.redivis.com/api/resource-definitions/variablestatistics).&#x20;

If the statistics haven't yet been computed, will wait for statistics to compute before returning. Will raise an error if the variable does not exist.

### **Returns:**

**dict (**[**see VariableStatistics resource definition**](https://docs.redivis.com/api/resource-definitions/variablestatistics)**)**

### Examples:

<pre class="language-python"><code class="lang-python"><strong>table = redivis.organization("Demo").dataset("iris_species").table("iris")
</strong>
variable = table.variable("sepalLengthCm")
statistics = variable.getStatistics() 

print(statistics)

{
	"kind": "variableStatistics",
	"status": "completed",
	"count": 150,
	"numDistinct": 35,
	"min": 4.3,
	"max": 7.9,
	"mean": 5.8433333333333355,
	"approxMedian": 0.8280661279778625,
	...
}
</code></pre>
