Spaces:
Sleeping
Sleeping
Bima Ardhia commited on
Commit ·
970edc1
1
Parent(s): b2ff085
sort
Browse files
api.py
CHANGED
|
@@ -39,7 +39,7 @@ def get_transactions(user_id):
|
|
| 39 |
# Hitung grand total harian
|
| 40 |
def prepare_data(df):
|
| 41 |
df['transaction_date'] = pd.to_datetime(df['transaction_date'])
|
| 42 |
-
df = df.sort_values('transaction_date')
|
| 43 |
|
| 44 |
grand_total = 0
|
| 45 |
grand_totals = []
|
|
|
|
| 39 |
# Hitung grand total harian
|
| 40 |
def prepare_data(df):
|
| 41 |
df['transaction_date'] = pd.to_datetime(df['transaction_date'])
|
| 42 |
+
df = df.sort_values(by=['transaction_date', 'id'])
|
| 43 |
|
| 44 |
grand_total = 0
|
| 45 |
grand_totals = []
|