File size: 1,069 Bytes
52c9a65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
29
30
31
32
33
import streamlit as st
import pandas as pd
import plotly.express as px
import pandas_profiling

@st.cache
def load_data(file):
    return pd.read_csv(file)

def main():
    st.set_page_config(page_title="AutoML", page_icon=":robot:", layout="wide")
    st.title("AutoML Streamlit Application")
    file = st.file_uploader("Upload your CSV file", type=["csv"])
    if file is not None:
        df = load_data(file)
        st.dataframe(df.head(10))
        st.write("Statistics:")
        st.write(df.describe())
        st.write("Data Distribution:")
        st.write(df.hist())
        st.write("Pandas Profiling:")
        profile = df.profile_report(title="Pandas Profiling Report")
        st.write(profile)
        st.write("Pandas Profiling (Sunburst Chart):")
        sunburst = profile.get_final_html()
        st.write(sunburst, unsafe_allow_html=True)
        st.write("Filter by Column:")
        column = st.selectbox("Select Column", df.columns)
        filtered = df.sort_values(by=column)
        st.write(filtered)

if __name__ == '__main__':
    main()