Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,16 +3,23 @@ import pandas as pd
|
|
3 |
import seaborn as sns
|
4 |
import matplotlib.pyplot as plt
|
5 |
from dataset_import import load_data
|
|
|
6 |
|
7 |
st.title("AnalyzeYT Dataset Analysis")
|
8 |
|
9 |
-
# Load dataset
|
10 |
data = load_data()
|
11 |
|
12 |
if data is not None:
|
13 |
st.write("Loaded Data Preview:")
|
14 |
st.write(data.head())
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Show data description
|
17 |
st.write("Data Description:")
|
18 |
st.write(data.describe())
|
@@ -21,7 +28,7 @@ if data is not None:
|
|
21 |
st.write("Correlation Matrix:")
|
22 |
corr = data.corr()
|
23 |
st.write(corr)
|
24 |
-
|
25 |
st.pyplot()
|
26 |
|
27 |
# Data visualization options
|
|
|
3 |
import seaborn as sns
|
4 |
import matplotlib.pyplot as plt
|
5 |
from dataset_import import load_data
|
6 |
+
from data_cleaning import clean_data
|
7 |
|
8 |
st.title("AnalyzeYT Dataset Analysis")
|
9 |
|
10 |
+
# Load and clean dataset
|
11 |
data = load_data()
|
12 |
|
13 |
if data is not None:
|
14 |
st.write("Loaded Data Preview:")
|
15 |
st.write(data.head())
|
16 |
+
|
17 |
+
# Clean data
|
18 |
+
data = clean_data(data)
|
19 |
+
|
20 |
+
st.write("Cleaned Data Preview:")
|
21 |
+
st.write(data.head())
|
22 |
+
|
23 |
# Show data description
|
24 |
st.write("Data Description:")
|
25 |
st.write(data.describe())
|
|
|
28 |
st.write("Correlation Matrix:")
|
29 |
corr = data.corr()
|
30 |
st.write(corr)
|
31 |
+
sns.heatmap(corr, annot=True, cmap='coolwarm')
|
32 |
st.pyplot()
|
33 |
|
34 |
# Data visualization options
|