working callback, known minor visual with total spend
This commit is contained in:
+14
-5
@@ -53,8 +53,17 @@ spend_per_payee = master_transactions.sql('''
|
||||
'''
|
||||
)
|
||||
|
||||
# print(spend_per_day)
|
||||
today = date(date.today())
|
||||
# Convert the dates to datetime objects that are compatible with Polars
|
||||
start_date = pl.Date(today)
|
||||
print(start_date)
|
||||
def update_dates(start_date, end_date):
|
||||
print("start date", start_date)
|
||||
print("end date", end_date)
|
||||
print(master_transactions)
|
||||
master_data = master_transactions.filter(
|
||||
pl.col("date").is_between(start_date, end_date)
|
||||
)
|
||||
return master_data
|
||||
|
||||
today = date.today()
|
||||
one_year_ago = today - timedelta(days=5)
|
||||
|
||||
data = update_dates(start_date=one_year_ago, end_date=today)
|
||||
print(data)
|
||||
Reference in New Issue
Block a user