Update pages/2_Data_CLeaning_and_Preprocessing.py
Browse files
pages/2_Data_CLeaning_and_Preprocessing.py
CHANGED
|
@@ -9,8 +9,25 @@ st.markdown("""
|
|
| 9 |
By performing simple Exploratory Data Analysis (EDA), we can examine the data, identify patterns, and detect anomalies or inconsistencies. This process allows us to clean and preprocess the dataset effectively, ensuring it is well-structured and ready for further analysis or modeling. Simple EDA helps uncover hidden insights, address missing or erroneous values, and optimize the data for better decision-making.
|
| 10 |
""")
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# File uploader for dataset
|
| 13 |
-
uploaded_file = st.file_uploader("Upload your dataset (CSV format):", type=["csv"])
|
| 14 |
|
| 15 |
if uploaded_file is not None:
|
| 16 |
# Read and display the dataset
|
|
|
|
| 9 |
By performing simple Exploratory Data Analysis (EDA), we can examine the data, identify patterns, and detect anomalies or inconsistencies. This process allows us to clean and preprocess the dataset effectively, ensuring it is well-structured and ready for further analysis or modeling. Simple EDA helps uncover hidden insights, address missing or erroneous values, and optimize the data for better decision-making.
|
| 10 |
""")
|
| 11 |
|
| 12 |
+
import streamlit as st
|
| 13 |
+
import pandas as pd
|
| 14 |
+
|
| 15 |
+
st.title("Upload Dataset")
|
| 16 |
+
|
| 17 |
+
uploaded_file = st.file_uploader("Upload CSV", type=["csv"])
|
| 18 |
+
|
| 19 |
+
if uploaded_file is not None:
|
| 20 |
+
data = pd.read_csv(uploaded_file)
|
| 21 |
+
st.session_state['df'] = data # Store in session state
|
| 22 |
+
st.success("Dataset uploaded successfully!")
|
| 23 |
+
|
| 24 |
+
st.write("### Preview of Dataset")
|
| 25 |
+
st.dataframe(data)
|
| 26 |
+
else:
|
| 27 |
+
st.info("Upload a CSV file to get started.")
|
| 28 |
+
|
| 29 |
# File uploader for dataset
|
| 30 |
+
# uploaded_file = st.file_uploader("Upload your dataset (CSV format):", type=["csv"])
|
| 31 |
|
| 32 |
if uploaded_file is not None:
|
| 33 |
# Read and display the dataset
|