Sep-28-2020, 01:36 AM

Howdy! Am a newbie, appreciate any guidance shared.

Given an excel with data with rows of information with a Field called cities: Melbourne, Singapore, Kuala Lumpur, New York.

How do I code to generate a graph counting how many entries belong e.g. to Melbourne / Singapore / and all the other cities? Trying for a horizontal or vertical bar chart for display.

Big thanks!

Given an excel with data with rows of information with a Field called cities: Melbourne, Singapore, Kuala Lumpur, New York.

How do I code to generate a graph counting how many entries belong e.g. to Melbourne / Singapore / and all the other cities? Trying for a horizontal or vertical bar chart for display.

Big thanks!

import pandas as pd import matplotlib import matplotlib.pyplot as plt import seaborn as sns import numpy as np df = pd.read_excel (r'C:\Users\Data20192020.xlsx') plt.style.use('seaborn-dark') plt.plot(df['Cities'].value_counts()) plt.show()