Hello everyone i wanr to represent the following result of a counter:
Counter({'U.S.': 852, 'U.S.S.R/Russia': 273, 'Japan': 20, 'France': 18, 'Canada': 18, 'Germany': 16, 'China': 14, 'Italy': 13, 'U.K./U.S.': 6, 'Switzerland': 4, 'Australia':......
I try to use matplotlib to represent the results but i cant find how can i do this. That what i try:
def contador_nacionalidades(datos):
contadas={}
numero_astronautas=[(e.nacionalidad) for e in datos]
contador= Counter(numero_astronautas)
return contador
contador.sort(key=lambda x: x[0], reverse=True)
contadas=contador
return contadas, contador
plt.bar(contadas.keys(), contadas.values())
plt.show()
Thanks

Here is a Barchart using the given
Countervalues.Output: