Spaces:
Runtime error
Runtime error
import numpy as np | |
import pandas as pd | |
import streamlit as st | |
# from pandas_profiling import ProfileReport | |
from ydata_profiling import ProfileReport | |
from streamlit_pandas_profiling import st_profile_report | |
st.markdown(''' | |
# **The EDA App** | |
Unleash the Power of Data Exploration with our EDA App: Dive Deep, Discover Insights, and Empower Your Analysis! | |
**Credit:** App built by [Sanjana Singamsetty](https://github.com/sanjana-singamsetty) | |
--- | |
''') | |
# Upload CSV data | |
with st.sidebar.header('1. Upload your CSV data'): | |
uploaded_file = st.sidebar.file_uploader("Upload your input CSV file", type=["csv"]) | |
st.sidebar.markdown(""" | |
[Example CSV input file](https://raw.githubusercontent.com/sanjana-singamsetty/sample/master/delaney_solubility_with_descriptors.csv) | |
""") | |
if uploaded_file is not None: | |
def load_csv(): | |
csv = pd.read_csv(uploaded_file) | |
return csv | |
df = load_csv() | |
pr = ProfileReport(df, explorative=True) | |
st.header('**Input DataFrame**') | |
st.dataframe(df) | |
st.header('**Pandas Profiling Report**') | |
st_profile_report(pr) | |
else: | |
st.info('Please Upload CSV file to Begin.') | |
if st.button('If you have nodataset Press me!>-<'): | |
# Example data | |
def load_data(): | |
a = pd.DataFrame( | |
np.random.rand(100, 5), | |
columns=['a', 'b', 'c', 'd', 'e'] | |
) | |
return a | |
df = load_data() | |
pr = ProfileReport(df, explorative=True) | |
st.header('**Input DataFrame**') | |
st.write(df) | |
st.write('---') | |
st.header('**Pandas Profiling Report**') | |
st_profile_report(pr) | |