Assignment 1
Assignment 1
ipynb - Colab
import pandas as pd
import numpy as np
print(titanic_data.head())
print(titanic_data.info())
<ipython-input-5-e4f1bc44da57>:2: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assi
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col
titanic_data['Age'].fillna(titanic_data['Age'].median(), inplace=True)
https://colab.research.google.com/drive/1ER7sS51QdSrWxsQQDyKxwPBbBfyZ4EDG#scrollTo=HzsE0ed0iMCs&printMode=true 1/2
4/14/25, 12:18 PM assignment1.ipynb - Colab
https://colab.research.google.com/drive/1ER7sS51QdSrWxsQQDyKxwPBbBfyZ4EDG#scrollTo=HzsE0ed0iMCs&printMode=true 2/2