# 판다스의 데이터프레임을, 웹화면으로 보여주는 방법
import streamlit as st
import pandas as pd
def main() :
st.title('아이리스 꽃 데이터')
df = pd.read_csv('streamlit_data/iris.csv')
st.dataframe(df)
species = df['species'].unique()
st.text('아이리스 꽃은 '+species + '으로 되어있다.')
if __name__ == '__main__' :
main()
위 코드처럼 streamlit 에 dataframe() 으로 읽어올수있다.
'개발 > 대시보드' 카테고리의 다른 글
웹 대시보드 - 여러 UI 함수 4(Image,video) (0) | 2022.12.12 |
---|---|
웹 대시보드 - 여러 UI 함수 3(button,radio,checkbox,selectbox,multiselect,slider,expander) (0) | 2022.12.12 |
웹 대시보드 - 여러 UI 함수 2( success,warning,info,error,help) (0) | 2022.12.12 |
웹 대시보드 - 여러 UI함수 1(title,header,subheader,text) (0) | 2022.12.12 |
웹 대시보드 - streamlit 실행하는 방법 (0) | 2022.12.12 |