Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -203,19 +203,19 @@ def main():
|
|
| 203 |
else:
|
| 204 |
st.session_state.data = manual_data_entry()
|
| 205 |
|
| 206 |
-
|
| 207 |
st.subheader("데이터 미리보기 및 수정")
|
| 208 |
-
st.write("데이터를 확인하고 필요한 경우 수정하세요. 열
|
| 209 |
|
| 210 |
-
# 열
|
| 211 |
-
|
| 212 |
-
edited_columns = st.data_editor(column_df, num_rows="dynamic", key="column_editor")
|
| 213 |
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
|
|
|
| 219 |
|
| 220 |
if st.button("데이터 분석 시작", key="start_analysis") or st.session_state.analysis_performed:
|
| 221 |
if not st.session_state.analysis_performed:
|
|
|
|
| 203 |
else:
|
| 204 |
st.session_state.data = manual_data_entry()
|
| 205 |
|
| 206 |
+
if st.session_state.data is not None:
|
| 207 |
st.subheader("데이터 미리보기 및 수정")
|
| 208 |
+
st.write("데이터를 확인하고 필요한 경우 수정하세요. 열 이름을 직접 클릭하여 수정할 수 있습니다:")
|
| 209 |
|
| 210 |
+
# 열 이름을 수정 가능하게 설정
|
| 211 |
+
column_config = {col: st.column_config.TextColumn(col, max_chars=50) for col in st.session_state.data.columns}
|
|
|
|
| 212 |
|
| 213 |
+
edited_data = st.data_editor(
|
| 214 |
+
st.session_state.data,
|
| 215 |
+
num_rows="dynamic",
|
| 216 |
+
column_config=column_config,
|
| 217 |
+
key="data_editor"
|
| 218 |
+
)
|
| 219 |
|
| 220 |
if st.button("데이터 분석 시작", key="start_analysis") or st.session_state.analysis_performed:
|
| 221 |
if not st.session_state.analysis_performed:
|