Spaces:
Sleeping
Sleeping
“vchandraiitk” commited on
Commit ·
a9d5fbb
1
Parent(s): f7ee2d2
- src/read_data.py +4 -1
src/read_data.py
CHANGED
|
@@ -9,7 +9,10 @@ def get_customer_details(customer_id):
|
|
| 9 |
df = pd.read_csv(cust_path)
|
| 10 |
customer_row = df[df["Customer_Id"] == customer_id]
|
| 11 |
if customer_row.empty:
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
customer_dict = customer_row.iloc[0].to_dict()
|
| 15 |
return customer_row, customer_dict
|
|
|
|
| 9 |
df = pd.read_csv(cust_path)
|
| 10 |
customer_row = df[df["Customer_Id"] == customer_id]
|
| 11 |
if customer_row.empty:
|
| 12 |
+
df = pd.read_csv(org_path)
|
| 13 |
+
customer_row = df[df["Customer_Id"] == customer_id]
|
| 14 |
+
if customer_row.empty:
|
| 15 |
+
return None, None
|
| 16 |
|
| 17 |
customer_dict = customer_row.iloc[0].to_dict()
|
| 18 |
return customer_row, customer_dict
|