Gopala Krishna
commited on
Commit
·
5423e57
1
Parent(s):
ad0715b
Working with dotted line
Browse files- .vs/IBCFProductRecommendations/v17/.wsuo +0 -0
- app.py +3 -4
.vs/IBCFProductRecommendations/v17/.wsuo
CHANGED
|
Binary files a/.vs/IBCFProductRecommendations/v17/.wsuo and b/.vs/IBCFProductRecommendations/v17/.wsuo differ
|
|
|
app.py
CHANGED
|
@@ -43,10 +43,9 @@ def find_similar_items(stock_code):
|
|
| 43 |
)
|
| 44 |
|
| 45 |
# Return the list of similar items of the given StockCode with item Description.
|
| 46 |
-
results_df = df1a.loc[df1a['StockCode'].isin(top_5_similar_items),
|
| 47 |
-
|
| 48 |
-
results_list
|
| 49 |
-
results_list.insert(4, '-'*50) # Insert dotted line after the 3rd item
|
| 50 |
return "\n".join(results_list)
|
| 51 |
|
| 52 |
# Set up the interface
|
|
|
|
| 43 |
)
|
| 44 |
|
| 45 |
# Return the list of similar items of the given StockCode with item Description.
|
| 46 |
+
results_df = df1a.loc[df1a['StockCode'].isin(top_5_similar_items), 'Description'].drop_duplicates().to_frame().reset_index(drop=True)
|
| 47 |
+
results_list = results_df.to_string(header=False, index=False).split('\n')
|
| 48 |
+
results_list.insert(1, '-'*50) # Insert dotted line after the first item
|
|
|
|
| 49 |
return "\n".join(results_list)
|
| 50 |
|
| 51 |
# Set up the interface
|