-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
30 lines (23 loc) · 729 Bytes
/
Copy pathapp.py
File metadata and controls
30 lines (23 loc) · 729 Bytes
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
import pygwalker as pyg
import pandas as pd
import streamlit.components.v1 as components
import streamlit as st
# Adjust the width of the Streamlit page
st.set_page_config(
page_title="Dataset explorer",
layout="wide",
initial_sidebar_state="collapsed"
)
# Add Title
st.title("Dataset Explorer")
# add sidebar
st.sidebar.title('Settings')
uploaded_file = st.sidebar.file_uploader('CSV file loader')
# Import your data
df = pd.DataFrame()
if uploaded_file is not None:
df = pd.read_csv(uploaded_file)
# Generate the HTML using Pygwalker
pyg_html = pyg.walk(df, return_html=True)
# Embed the HTML into the Streamlit app
components.html(pyg_html, height=1000, scrolling=True)