Handling missing values is an important step in data preprocessing. Here's an example of how you can handle missing values using the Pandas library:
import pandas as pd
# Assuming 'data' is your DataFrame
# Fill missing values with the mean of the column
data_filled = data.fillna(data.mean())
# Remove rows with missing values
data_dropped = data.dropna()
# Replace missing values with a specified value
data_replaced = data.fillna(-1)
# Print the modified data
print(data_filled.head())
print(data_dropped.head())
print(data_replaced.head())