Skip to content
View SANDHYA16252006's full-sized avatar

Block or report SANDHYA16252006

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
SANDHYA16252006/README.md
  1. Import the Dataset & Explore Basic Info python Copy Edit import pandas as pd

df = pd.read_csv('titanic.csv') # Adjust filename if different print(df.info()) print(df.describe()) print(df.isnull().sum()) 2. Handle Missing Values Age: Use mean or median.

Cabin: May drop or label as "Unknown".

Embarked: Fill with mode (most common port).

python Copy Edit df['Age'].fillna(df['Age'].median(), inplace=True) df['Embarked'].fillna(df['Embarked'].mode()[0], inplace=True) df['Cabin'].fillna('Unknown', inplace=True) 3. Encode Categorical Features python Copy Edit df['Sex'] = df['Sex'].map({'male': 0, 'female': 1}) df = pd.get_dummies(df, columns=['Embarked'], drop_first=True) 4. Normalize/Standardize Numerical Features Use StandardScaler or MinMaxScaler:

python Copy Edit from sklearn.preprocessing import StandardScaler

scaler = StandardScaler() df[['Age', 'Fare']] = scaler.fit_transform(df[['Age', 'Fare']]) 5. Visualize and Remove Outliers python Copy Edit import seaborn as sns import matplotlib.pyplot as plt

sns.boxplot(x=df['Fare']) plt.show()

Remove outliers (optional)

df = df[df['Fare'] < df['Fare'].quantile(0.99)]

Popular repositories Loading

  1. SANDHYA16252006 SANDHYA16252006 Public

    Config files for my GitHub profile.

  2. Sandhya-B- Sandhya-B- Public

  3. TASK-01 TASK-01 Public

    Jupyter Notebook

  4. task2 task2 Public

    Jupyter Notebook

  5. TASK-03 TASK-03 Public

    Jupyter Notebook

  6. Task-04 Task-04 Public

    Jupyter Notebook