Spaces:
Sleeping
Sleeping
File size: 1,053 Bytes
85acae2 |
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
import streamlit as st
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import sklearn
import streamlit as st
import pandas as pd
import numpy as np
# Load the dataset
df = pd.read_csv(r"C:\Users\91879\Downloads\data.csv")
st.title("π Exploratory Data Analysis")
# Fill missing values
df.fillna(df.mean(), inplace=True)
st.subheader("π View Dataset Preview")
if st.button("π Show Dataset Head"):
st.dataframe(df.head())
features = [
'Brake_Pressure', 'Pad_Wear_Level', 'ABS_Status',
'Wheel_Speed_FL', 'Wheel_Speed_FR',
'Wheel_Speed_RL', 'Wheel_Speed_RR',
'Fluid_Temperature', 'Pedal_Position'
]
st.subheader("β οΈ Fault Distribution")
fault_counts = df['Fault'].value_counts()
st.bar_chart(fault_counts)
st.write(df['Fault'].value_counts(normalize=True) * 100)
st.subheader("π Correlation Heatmap")
corr = df.corr()
fig, ax = plt.subplots(figsize=(10, 8))
sns.heatmap(corr, annot=True, fmt=".2f", cmap="coolwarm", ax=ax)
st.pyplot(fig)
|