added extra query

This commit is contained in:
Chinenye Nmoh
2026-03-17 09:37:08 +01:00
parent bfb35e0285
commit 569d4c45d7
49 changed files with 4516 additions and 4505 deletions
+15 -15
View File
@@ -1,16 +1,16 @@
def preprocess_loan_charges_data(data):
"""
Preprocesses the data into a dictionary for efficient lookups by 'code'.
Args:
data: A list of dictionaries.
Returns:
A dictionary where keys are 'code' values and values are the corresponding dictionaries from the input data.
If multiple items have the same code, the last one encountered will be stored.
"""
preprocessed = {}
for item in data:
if 'code' in item:
preprocessed[item['code']] = item
def preprocess_loan_charges_data(data):
"""
Preprocesses the data into a dictionary for efficient lookups by 'code'.
Args:
data: A list of dictionaries.
Returns:
A dictionary where keys are 'code' values and values are the corresponding dictionaries from the input data.
If multiple items have the same code, the last one encountered will be stored.
"""
preprocessed = {}
for item in data:
if 'code' in item:
preprocessed[item['code']] = item
return preprocessed