fschwartzer commited on
Commit
75ee1ab
1 Parent(s): c078d65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -74,7 +74,9 @@ def select_nearest_items(df):
74
  nearest_items = pd.DataFrame()
75
  for _, row in df_sorted.iterrows():
76
  if row['Marketplace'] not in included_marketplaces:
77
- nearest_items = pd.concat([nearest_items, row], ignore_index=True)
 
 
78
  included_marketplaces.add(row['Marketplace'])
79
  if len(included_marketplaces) >= 3: # Ensure at least 3 unique marketplaces are included
80
  break
 
74
  nearest_items = pd.DataFrame()
75
  for _, row in df_sorted.iterrows():
76
  if row['Marketplace'] not in included_marketplaces:
77
+ # Convert row to DataFrame and append correctly
78
+ row_df = pd.DataFrame([row])
79
+ nearest_items = pd.concat([nearest_items, row_df], ignore_index=True)
80
  included_marketplaces.add(row['Marketplace'])
81
  if len(included_marketplaces) >= 3: # Ensure at least 3 unique marketplaces are included
82
  break