rairo commited on
Commit
f4e0a2e
·
verified ·
1 Parent(s): 019cfcf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -79,10 +79,10 @@ def create_dashboard(data):
79
 
80
  with col2:
81
  # Event Types Distribution
82
- event_counts = data['events']['Order Value $'].sum().reset_index()
83
  event_counts.columns = ['Event', 'Order Value $'] # Rename columns explicitly
84
  fig = px.pie(event_counts, names='Event', values='Order Value',
85
- title='Event Type Distribution')
86
  st.plotly_chart(fig, use_container_width=True)
87
 
88
  # Top Products Analysis
 
79
 
80
  with col2:
81
  # Event Types Distribution
82
+ event_counts = data['events'].groupby('Event')['Order Value $'].sum().reset_index()
83
  event_counts.columns = ['Event', 'Order Value $'] # Rename columns explicitly
84
  fig = px.pie(event_counts, names='Event', values='Order Value',
85
+ title='Event Type Distribution By Order Value')
86
  st.plotly_chart(fig, use_container_width=True)
87
 
88
  # Top Products Analysis