rairo commited on
Commit
b9ded2f
·
verified ·
1 Parent(s): 2e17513

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -48,7 +48,7 @@ def load_data():
48
  st.error(f"Error loading data: {e}")
49
  return None
50
 
51
- # Dashboard Tab Functions
52
  def create_dashboard(data):
53
  """Create dashboard visualizations"""
54
  st.header("Business Insights Dashboard")
@@ -71,7 +71,8 @@ def create_dashboard(data):
71
  with col2:
72
  # Event Types Distribution
73
  event_counts = data['events']['Event'].value_counts().reset_index()
74
- fig = px.pie(event_counts, names='Event', values='count',
 
75
  title='Event Type Distribution')
76
  st.plotly_chart(fig, use_container_width=True)
77
 
 
48
  st.error(f"Error loading data: {e}")
49
  return None
50
 
51
+ #Dashboard
52
  def create_dashboard(data):
53
  """Create dashboard visualizations"""
54
  st.header("Business Insights Dashboard")
 
71
  with col2:
72
  # Event Types Distribution
73
  event_counts = data['events']['Event'].value_counts().reset_index()
74
+ event_counts.columns = ['Event', 'Count'] # Rename columns explicitly
75
+ fig = px.pie(event_counts, names='Event', values='Count',
76
  title='Event Type Distribution')
77
  st.plotly_chart(fig, use_container_width=True)
78