Download app.py from niladridutta/automated_data_profiling: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/niladridutta/automated_data_profiling/resolve/main/app.py
- Command line
-
hf download hf://spaces/niladridutta/automated_data_profiling/app.py
-
curl -L -o app.py https://huggingface.co/spaces/niladridutta/automated_data_profiling/resolve/main/app.py
1.01 kB
| import streamlit as st | |
| import numpy as np | |
| import pandas as pd | |
| from ydata_profiling import ProfileReport | |
| st.set_page_config(page_title='Automated Data Profiling') | |
| st.title('AUTOMATED DATA PROFILING') | |
| st.subheader('Upload your CSV file') | |
| uploaded_file = st.file_uploader('Choose a CSV file', type={"csv"}) | |
| if uploaded_file is not None: | |
| st.markdown('---') | |
| def load_excel(file1): | |
| df = pd.read_csv(file1, encoding='latin-1') | |
| return df | |
| df = load_excel(uploaded_file) | |
| df = df.replace(np.nan,'',regex=True) | |
| st.subheader('Data Preview') | |
| st.dataframe(df.head(20)) | |
| profile = ProfileReport(df, title="Profiling Report") | |
| profile.to_file("Profile_Report.html") | |
| with open("Profile_Report.html", "rb") as file: | |
| btn = st.download_button( | |
| label="Download Profile Report", | |
| data=file, | |
| file_name="Profile_Report.html", | |
| mime="html" | |
| ) | |