Как получить данные за последние 12 месяцев?Python

Программы на Python
Anonymous
Как получить данные за последние 12 месяцев?

Сообщение Anonymous »


I have a dataset that updates on a daily basis, and I am trying to create a bar chart that shows the number of sales for each sub-category within the past 12 months. This is what my dataset looks like:

Order Date Sub-Category Customer Name Sales 0 2016-11-08 Bookcases Claire Gute 261.9600 1 2016-11-08 Chairs Claire Gute 731.9400 2 2016-06-12 Labels Darrin Van Huff 14.6200 3 2015-10-11 Tables Sean O'Donnell 957.5775 4 2015-10-11 Storage Sean O'Donnell 22.3680 My data goes all the way back to 2020 and to today's date. In the beginning I tried filtering but then I realized that the bars will not update because it's only going to give me data in the time frame that I set it to. Could someone please help me figure out how to get the number of sales within the past 12 months?


Источник: https://stackoverflow.com/questions/775 ... -12-months

Вернуться в «Python»