Skip to content

Commit

Permalink
Consecutive_no_transactions_out à besoin de status = 1 pour augmenter.
Browse files Browse the repository at this point in the history
…Fix #20
  • Loading branch information
armgilles committed Sep 3, 2020
1 parent 4a59090 commit 03718d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Git LFS file not shown
6 changes: 5 additions & 1 deletion vcub_keeper/transform/features_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def get_consecutive_no_transactions_out(data):
Si il n'y a pas de données d'activité pour la station (absence de 'available_stands'),
alors consecutive_no_transactions_out = 0 et une fois qu'il y a a nouveau de l'activité (des données)
le compteur `consecutive_no_transactions_out` reprend
le compteur `consecutive_no_transactions_out` reprend.
Cet indicateur à aussi besoin que la station soit connecté (status == 1) afin de que le compteur
avance (sinon = 0)
Parameters
----------
Expand All @@ -139,6 +142,7 @@ def get_consecutive_no_transactions_out(data):
data['consecutive_no_transactions_out'] = \
data.groupby(['station_id',
(data['have_data'] == 0).cumsum(),
(data['status'] == 0).cumsum(),
(data['transactions_out'] > 0).cumsum()]).cumcount()

data['consecutive_no_transactions_out'] = \
Expand Down

0 comments on commit 03718d8

Please sign in to comment.