Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ def calculate_kpis(df):
|
|
| 56 |
else:
|
| 57 |
top_five_product = "there are less than 5 products in this dataset"
|
| 58 |
|
| 59 |
-
if df['
|
| 60 |
best_branch = df.groupby('Name')['Price'].sum().nlargest(1).index.tolist()
|
| 61 |
else:
|
| 62 |
best_branch = "there is only one branch in this dataset"
|
|
|
|
| 56 |
else:
|
| 57 |
top_five_product = "there are less than 5 products in this dataset"
|
| 58 |
|
| 59 |
+
if df['Name'].nunique() > 1:
|
| 60 |
best_branch = df.groupby('Name')['Price'].sum().nlargest(1).index.tolist()
|
| 61 |
else:
|
| 62 |
best_branch = "there is only one branch in this dataset"
|