This commit is contained in:
2023-03-26 16:47:58 +02:00
parent 13007bd009
commit 80fdc33706
+1 -2
View File
@@ -43,12 +43,11 @@ plt.savefig('files/all_weekdays.png')
plt.close() plt.close()
data.groupby(['hour']).count()['count'].plot.bar(x='hour', align='center') data.groupby(['hour']).count()['count'].plot.bar(x='hour', align='center')
plt.title('Hourly frquency of all time') plt.title('Hourly frequency of all time')
plt.savefig('files/all_hour.png') plt.savefig('files/all_hour.png')
plt.close() plt.close()
# Calculate on which day the most coffee was made # Calculate on which day the most coffee was made
monthly['count'] = 1
aggregated = monthly.groupby(['day']).count()['count'] aggregated = monthly.groupby(['day']).count()['count']
message1 = 'Last month, coffee was made {amount} times.'.format(amount=len(monthly)) + ' Most coffee was made on day {day} of the month, with a total amount of {amount} times.'.format(day=aggregated.idxmax(),amount=aggregated.max()) + ' From the start of this chat, a grand total amount of {amount} times coffee was made.'.format(amount=grand_total) message1 = 'Last month, coffee was made {amount} times.'.format(amount=len(monthly)) + ' Most coffee was made on day {day} of the month, with a total amount of {amount} times.'.format(day=aggregated.idxmax(),amount=aggregated.max()) + ' From the start of this chat, a grand total amount of {amount} times coffee was made.'.format(amount=grand_total)