Question: I used Counter() to count the number of occurrences of keys.

So I have `({'A':1, 'B':3, 'C':1, 'D':2, 'E':1, 'F':3, G:'2'})`

How can I use that information to build a histogram for the numbers of values:

* For 1 the value is 3
* For 2 the value is 2
* For 3 the value is 2

Answer: 
This looks like a dictionary, so I guess you can use `bar` from `matplotlib`:

```
frequency_calculated = ({'A':1, 'B':3, 'C':1, 'D':2, 'E':1, 'F':3, 'G':2})
plt.bar(frequency_calculated.keys(), frequency_calculated.values())

```

with **result**:

[![enter image description here](https://i.stack.imgur.com/uvkXw.png)](https://i.stack.imgur.com/uvkXw.png)

**EDIT**

From calculated frequency your data looks like `a`, and you can plot histogram of that:

```
a = ('A','B','B','B','C','D','D','E','F','F','F','G','G')
plt.hist(a)

```

**with result:**

[![enter image description here](https://i.stack.imgur.com/3EzBc.png)](https://i.stack.imgur.com/3EzBc.png)

To display histogram you don't need to calculate frequency. Histogram differs from a bar graph, in the sense that a bar graph relates two variables, but a histogram relates only one. 

[Difference between bar and histogram](https://stattrek.com/statistics/charts/histogram.aspx)
do you want this? corrected your dictionary's last element, as I think you meant what I wrote.

```
import pandas as pd
data = pd.Series({'A':1, 'B':3, 'C':1, 'D':2, 'E':1, 'F':3, 'G':2})
data.value_counts()

1    3
3    2
2    2
dtype: int64

```