优化
This commit is contained in:
@@ -73,7 +73,11 @@ def calc_percentile(city=None):
|
||||
_id = str(item["id"])
|
||||
for column in columns:
|
||||
if pd.notna(item[column + '_percentile']):
|
||||
row[column + '_percentile'] = int(item[column + '_percentile'])
|
||||
if 'estate_charge_fix' == column:
|
||||
db_column = "estate_charge_percentile"
|
||||
else:
|
||||
db_column = column + '_percentile'
|
||||
row[db_column] = int(item[column + '_percentile'])
|
||||
|
||||
action = {'_op_type': 'update',
|
||||
'_index': index_name,
|
||||
|
||||
Reference in New Issue
Block a user