[Python] How can I detect if trend is increasing or decreasing in time series?

Discussão em 'Python' iniciado por Stack, Junho 21, 2025.

  1. Stack

    Stack Membro Participativo

    I have few weeks data with units sold given

    xs[weeks] = [1,2,3,4]
    ys['Units Sold'] = [1043,6582,5452,7571]


    from the given series, we can see that although there is a drop from xs[2] to xs[3] but overall the trend is increasing. How to detect the trend in small time series dataset.

    Is finding a slope for the line is the best way? And how to calculate slope angle of a line in python?

    Continue reading...

Compartilhe esta Página