samedi 17 octobre 2020

For Loop, If Statement with timestamps and conditions

I have a pandas dataframe with timestamps and parameters. Now i want only the rows that have a specific behaviour in the next 3 days and the following 70 days.

So for example:

Select only the rows where the revenue exceeds a specific value in the next 3 days and raises to 
another specific value in the next 70 Days, without dropping under a specific revenue value and
label this row as a "success". 
Select only the rows where the revenue exceeds a specific value in the next 3 days and drops
under a specific revenue value befor raising to a specific value in the next 70 days and label
this row as a "loss".
All other rows label as "Not Necessary"

Anybody has an idea how i can implement this time condition behaviour in a for loop?

Aucun commentaire:

Enregistrer un commentaire