728x90
st.dataframe(df)
status = st.radio('정렬을 선택하세요', ['오름차순정렬','내림차순정렬'])
if status == '오름차순정렬' :
st.dataframe( df.sort_values('petal_length') )
elif status == '내림차순정렬' :
st.dataframe( df.sort_values('petal_length',ascending=False))
'Streamlit' 카테고리의 다른 글
Streamlit 스트림릿에서 버튼 처리하는 방법 st.button (0) | 2022.01.07 |
---|---|
Streamlit 실행하는 방법 streamlit run {your app}.py (0) | 2022.01.07 |