diff --git a/videotron1.py b/videotron1.py index e67549a..1c58d88 100644 --- a/videotron1.py +++ b/videotron1.py @@ -51,6 +51,8 @@ while True: datasum = df.groupby('USER')['DATA'].sum( min_count=1).reset_index().sort_values(by='DATA') + total_users = len(datasum) # Nombre total d'utilisateurs + for index, row in datasum.iterrows(): total_data = round(row['DATA']) user = row['USER'] @@ -71,4 +73,5 @@ while True: else: total_data_text = "{} KB".format(total_data) - print("Total Data Usage:", total_data_text) + print("Total Users : {} \t Total Data Usage: {}".format( + total_users, total_data_text))