У меня есть фрейм данных pandas, в котором один столбец с именем «Creation_month» содержит номера месяцев в году.У меня работает следующий код:
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
'Oct', 'Nov', 'Dec']
indexes = []
for i in tickets['Creation_month']:
indexes.append(i)
index = list(sorted(set(indexes)))
new = tickets.groupby('Creation_month')['number_replies'].sum()
newplot = new.plot.bar()
plt.xticks(index, months)
plt.show()
У меня есть следующий график.Я не знаю, как это происходит.
