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
- del
- append()
- 분류 결과표
- IN
- numpy
- 최댓값
- data
- function
- nan
- 덴드로그램
- string
- pandas
- 최솟값
- Machine Learning
- sklearn
- len()
- matplotlib
- dendrogram
- count()
- wcss
- analizer
- list
- Dictionary
- insert()
- elbow method
- hierarchical_clustering
- DataFrame
- DataAccess
- Python
- 반복문
Archives
- Today
- Total
개발공부
[Streamlit] Dataframe 출력하기 본문
streamlit의 dataframe() 함수를 이용하면 된다.
import streamlit as st
import pandas as pd
def main():
df = pd.read_csv('data2/iris.csv')
st.dataframe(df)
species = df['species'].unique()
st.text('아이리스 꽃은 ' + species + ' 으로 되어있다.')
st.dataframe(df.head())
# write로 해도 가능
st.write(df.head())
if __name__ == '__main__':
main()

'Python > Streamlit' 카테고리의 다른 글
| [Streamlit] 체크 박스(Check box) 만들기 (0) | 2022.05.20 |
|---|---|
| [Streamlit] 라디오(Radio) 버튼 만들기 (0) | 2022.05.20 |
| [Streamlit] 버튼(Button) 만들기 (0) | 2022.05.20 |
| [Streamlit] 화면에 글자 출력하는 방법 (0) | 2022.05.20 |
| [Streamlit] 스트림릿(Streamlit) 설치 방법 및 "Hello World" 출력 (0) | 2022.05.19 |