JUNGU commited on
Commit
0330f36
ยท
verified ยท
1 Parent(s): b0b116f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -113,8 +113,10 @@ def perform_analysis(data):
113
  if not categorical_columns.empty:
114
  st.write("๋ฒ”์ฃผํ˜• ๋ณ€์ˆ˜ ๋ง‰๋Œ€ ๊ทธ๋ž˜ํ”„:")
115
  for column in categorical_columns:
116
- fig = px.bar(data[column].value_counts().reset_index(), x='index', y=column)
117
- fig.update_layout(title=f'{column} ๋ถ„ํฌ', xaxis_title=column, yaxis_title='๊ฐœ์ˆ˜')
 
 
118
  st.plotly_chart(fig)
119
 
120
  def main():
 
113
  if not categorical_columns.empty:
114
  st.write("๋ฒ”์ฃผํ˜• ๋ณ€์ˆ˜ ๋ง‰๋Œ€ ๊ทธ๋ž˜ํ”„:")
115
  for column in categorical_columns:
116
+ value_counts = data[column].value_counts().reset_index()
117
+ value_counts.columns = ['category', 'count']
118
+ fig = px.bar(value_counts, x='category', y='count', title=f'{column} ๋ถ„ํฌ')
119
+ fig.update_layout(xaxis_title=column, yaxis_title='๊ฐœ์ˆ˜')
120
  st.plotly_chart(fig)
121
 
122
  def main():