Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- matplotlib
- 반복문
- function
- 최솟값
- count()
- string
- DataAccess
- 덴드로그램
- sklearn
- analizer
- Machine Learning
- insert()
- elbow method
- IN
- Python
- hierarchical_clustering
- pandas
- 분류 결과표
- dendrogram
- Dictionary
- data
- numpy
- append()
- 최댓값
- DataFrame
- list
- nan
- wcss
- len()
- del
Archives
- Today
- Total
개발공부
[Streamlit] 라디오(Radio) 버튼 만들기 본문
Streamlit의 radio() 함수를 사용하면된다.
리턴값은 선택한 문자열이다.
import streamlit as st
def main():
selected = st.radio('라디오', ['1번','2번','3번'])
if selected == '1번':
st.text('1번을 선택했습니다.')
elif selected == '2번':
st.text('2번을 선택했습니다.')
elif selected == '3번':
st.text('3번을 선택했습니다.')
if __name__ == '__main__':
main()



'Python > Streamlit' 카테고리의 다른 글
| [Streamlit] 셀렉트 박스(Select Box) 만들기 (0) | 2022.05.20 |
|---|---|
| [Streamlit] 체크 박스(Check box) 만들기 (0) | 2022.05.20 |
| [Streamlit] 버튼(Button) 만들기 (0) | 2022.05.20 |
| [Streamlit] Dataframe 출력하기 (0) | 2022.05.20 |
| [Streamlit] 화면에 글자 출력하는 방법 (0) | 2022.05.20 |