I am new at Data Visualization with Python. I want to be able to plot the Groupby() results in a bar chart. I have converted a categorical array using the pd.factorize() function in Python. Then, I created a plot using the results of the groupby function.
Here is my code:
fact=pd.factorize(data['DayOfWeek'])
data['fact'].groupby(data['fact_dow']).count().plot(kind='bar',figsize=(14,8))
plt.show()
It looks almost good but the x-labels are the factorized results, I need to map them to their corresponding values.
Any one knows how to do this in a pythonic way? Also, if there are other suggestions as to how to do it, please comment.