Spaces:
Configuration error
Configuration error
Create zali analyze data
Browse files- zali analyze data +36 -0
zali analyze data
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Import necessary libraries
|
| 2 |
+
import streamlit as st
|
| 3 |
+
import pandas as pd
|
| 4 |
+
import matplotlib.pyplot as plt
|
| 5 |
+
import seaborn as sns
|
| 6 |
+
|
| 7 |
+
# Set the title of the app
|
| 8 |
+
st.title('Zali Ai')
|
| 9 |
+
|
| 10 |
+
# Allow the user to upload an Excel file
|
| 11 |
+
uploaded_file = st.file_uploader("Choose an Excel file", type='xlsx')
|
| 12 |
+
|
| 13 |
+
if uploaded_file is not None:
|
| 14 |
+
# Load the Excel file into a pandas DataFrame
|
| 15 |
+
data = pd.read_excel(uploaded_file)
|
| 16 |
+
|
| 17 |
+
# Display the DataFrame
|
| 18 |
+
st.dataframe(data)
|
| 19 |
+
|
| 20 |
+
# Allow the user to select a column to visualize
|
| 21 |
+
column_to_plot = st.selectbox('Select a column to visualize', data.columns)
|
| 22 |
+
|
| 23 |
+
# Create a histogram for the selected column
|
| 24 |
+
fig, ax = plt.subplots()
|
| 25 |
+
sns.histplot(data[column_to_plot], ax=ax, kde=True)
|
| 26 |
+
st.pyplot(fig)
|
| 27 |
+
|
| 28 |
+
# Create a boxplot for the selected column
|
| 29 |
+
fig, ax = plt.subplots()
|
| 30 |
+
sns.boxplot(data[column_to_plot], ax=ax)
|
| 31 |
+
st.pyplot(fig)
|
| 32 |
+
|
| 33 |
+
# Create a violin plot for the selected column
|
| 34 |
+
fig, ax = plt.subplots()
|
| 35 |
+
sns.violinplot(data[column_to_plot], ax=ax)
|
| 36 |
+
st.pyplot(fig)
|