This commit is contained in:
沈健
2025-04-10 10:08:20 +08:00
parent 51e4abdcfc
commit 747c79eef2
+1 -1
View File
@@ -74,7 +74,7 @@ def calc(city, year_month):
avg_price = stat['avg_price']
if pd.notna(avg_price):
action = UpdateOne({'city': city, 'name': name, 'cat': 'business', 'date': year_month},
{'$set': {'city': city, 'cat': 'business', 'date': year_month, 'avg_price': avg_price,
{'$set': {'city': city, 'name': name, 'cat': 'business', 'date': year_month, 'avg_price': avg_price,
'updated_date': datetime.now()}},
upsert=True)
actions.append(action)