Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ with tab1:
|
|
| 25 |
""")
|
| 26 |
|
| 27 |
# Load preloaded dataset
|
| 28 |
-
file_path = "
|
| 29 |
df = pd.read_excel(file_path, sheet_name='Online Retail')
|
| 30 |
|
| 31 |
# Dataset Overview Tab
|
|
@@ -89,4 +89,4 @@ with tab3:
|
|
| 89 |
|
| 90 |
# Show the segmented customer data
|
| 91 |
st.write("### Customer Segments Data")
|
| 92 |
-
st.write(customer_data.groupby("Cluster").agg({"TotalSpent": "mean", "NumTransactions": "mean", "AvgUnitPrice": "mean"}))
|
|
|
|
| 25 |
""")
|
| 26 |
|
| 27 |
# Load preloaded dataset
|
| 28 |
+
file_path = "Online Retail.xlsx"
|
| 29 |
df = pd.read_excel(file_path, sheet_name='Online Retail')
|
| 30 |
|
| 31 |
# Dataset Overview Tab
|
|
|
|
| 89 |
|
| 90 |
# Show the segmented customer data
|
| 91 |
st.write("### Customer Segments Data")
|
| 92 |
+
st.write(customer_data.groupby("Cluster").agg({"TotalSpent": "mean", "NumTransactions": "mean", "AvgUnitPrice": "mean"}))
|